如何将winform输入屏幕顶部 [英] how to oder a winform to top of screen
问题描述
我有一个c#win窗体程序,它包含midi父窗体和子窗体,我想在mdi子窗体中调用窗体
例如:
mdi子窗体是frmCompany.cs,当我在文本框上按f2功能键时,该窗体包含名为comCode的文本框,它应该会出现另一个调用frmsearch的窗体,但是在调用frmsearch窗体后,它应该是最高级的窗体,应该在关闭新调用的frmsearch表单之前,不允许访问以前的表单
如何执行此任务?
请帮助我
I have a c# win form program it''s contain midi parent and child forms i want to call a form in mdi child form
eg :
mdi child form is frmCompany.cs, this form contain text box called comCode when i press f2 function key on text box it should appear another form call frmsearch but the thing is after calling the frmsearch form it should be the top order form, it should not allow to access previous form until newly called frmsearch form is closed
how to do this task ?
Please Help Me
推荐答案
使用InstanceName.ShowDialog()使其保持模态,并且不要使此表单成为MDI子级.
Use InstanceName.ShowDialog() to keep it modal, and don''t make this form MDI child.
这篇关于如何将winform输入屏幕顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!