集中多形式? [英] focus multi form ?
本文介绍了集中多形式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的程序中,第一种形式有两种(主形式),第二种是我显示的,但是当按主形式中的任何位置时,第二种形式都变成了
我需要保持main
in my program have two form first (main form ) and i show the second but when press any where in main the second form become behind
i need to keep second front of main
推荐答案
的第二位您的应用程序的一部分!
而是在显示之前设置Owner属性:Owned属性永远不会在Owner后面:
There is the TopMost property which will do just that, but it makes it Topmost for all forms - even ones which are not part of your application!
Instead, set the Owner property before you display it: the Owned property will never be behind the Owner:
frmNew f = new frmNew();
f.Owner = this;
f.Show();
这篇关于集中多形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文