开发者

Total focus on a Form: ignore all others

开发者 https://www.devze.com 2023-02-11 11:29 出处:网络
in my VB.NET application, my main Form can show other Forms. That works fine, but I need to set \"focus\" on the newly opene开发者_开发技巧d form, and don\'t allow the user use the main form until the

in my VB.NET application, my main Form can show other Forms. That works fine, but I need to set "focus" on the newly opene开发者_开发技巧d form, and don't allow the user use the main form until the opened Form is closed. How do I do that?


The Form.ShowDialog() method shows a form as a dialog box; this should keep the focus on that form until it is closed (by the user or your code).


Use the Form.ShowDialog() method.

It will show you the form as a dialog box, so focusing is at total, and it will ignore all other forms or objects.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号