如何防止当前表单之外的点击? [英] How to prevent clicks outside the current form?
本文介绍了如何防止当前表单之外的点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要当用户单击按钮时将打开的表单,我不希望用户单击此表单之外的任何其他地方(防止他单击父表单上的任何其他按钮),我想限制他的此表单内的操作,直到他关闭它(当然,此表单是最上面的),我希望表单对其外部的任何点击发出警报(闪烁),以便用户了解他必须先关闭它.
I want the form which will open when the user click a button, I don't want the user to click anywhere else outside this form(preventing him from clicking any other buttons on the parent form), I want to restrict his actions inside this form until he close it (For sure this form is top most), and I want the form to make alert(flicker) to any clicks outside it so the user will understand that he have to close it first.
推荐答案
当打开表单而不是
Form form = new Form();
form.Show();
使用
Form form = new Form();
form.ShowDialog()
这篇关于如何防止当前表单之外的点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文