VB.NET:强制用户使用最顶层的窗体
我正在 Visual Studio 2010 中使用 VB.NET 编写一个扫雷克隆程序作为 Windows 窗体应用程序,但我在处理 Game Won 和 Game Lost 窗体时遇到了问题。当我显示这些表单时,我希望游戏表单仍然可见,以便玩家可以看到地雷在哪里,但我不希望在游戏获胜或游戏失败表单关闭之前启用游戏表单。就像 Windows 扫雷在你赢或输时所做的那样。
据我所知,这没有任何明显的属性,而且我没有运气谷歌搜索,我不知道要搜索什么术语。
如有任何帮助,我们将不胜感激,谢谢。
I'm programming a Minesweeper clone in Visual Studio 2010, with VB.NET, as a Windows Form Application, and I'm having trouble with the Game Won and Game Lost forms. When I show those forms, I want the game form to still be visible, so that the player can see where the mines were, but I don't want the game form to be enabled until the Game Won or Game Lost form is closed. Exactly like Windows Minesweeper does when you win or lose.
There aren't any obvious properties for this, as far as I can see, and I've had no luck Googling, I don't know what terms to search.
Any help is appreciated, thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 ShowDialog 方法显示子表单,使其成为模式。
Show the child form with ShowDialog method to make it modal.