帮助获得锁定焦点的窗口 [英] Help to get a window to lock focus
本文介绍了帮助获得锁定焦点的窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何获得一个将焦点锁定到用户必须先关闭窗口才能切换到父窗口的窗体?
解决方案
假鸡写道:我该怎么办?获取一个窗体以将焦点锁定到用户必须先关闭窗口才能切换到父窗口的位置?
可以通过ShowDialog()方法轻松完成.
Form frmNew = new Form2();<br /> frmNew .ShowDialog();
希望这对您有帮助:-D
我认为您希望在每张表格的顶部都显示一些内容,直到关闭为止;用户无法单击其他任何形式.屏幕锁之类的东西.
这是代码
您必须添加一个间隔很短的计时器,该计时器会在每个指定时间后从最上方开始显示u r.
加载表格时
this.WindowState = FormWindowState.Maximized;
并在计时器滴答事件中编写以下代码
this.TopMost = true;
这将锁定整个屏幕,直到您卸载(关闭)最上方的表格. (屏幕锁).
请给ans和rply评分以获得更多帮助.
khaliljkazi@gmail.com
How do I get a form to lock focus to where the user cannot switch to the parent window without closing it first?
解决方案
False Chicken wrote:How do I get a form to lock focus to where the user cannot switch to the parent window without closing it first?
It can be Simply Done by ShowDialog() method.Form frmNew = new Form2();<br /> frmNew .ShowDialog();
Hope this will help you :-D
i think u want something which display at the top of every form and until it get close; user can''t able to click on any other form. Something like Screen Locker.
Here is code
u have to add a timer with a very low interval which displays u r from on top most after every specified time.
on form load
this.WindowState = FormWindowState.Maximized;
and in timer tick event write the following code
this.TopMost = true;
this will lock u r entire screen until u unload(close ) the top most form. (Screen Locker).
plz rate ans and rply for any further help.
khaliljkazi@gmail.com
这篇关于帮助获得锁定焦点的窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文