简体   繁体   English

防止其他窗口重叠我的表单?

[英]Prevent other windows from overlapping my form?

I have a form that is on the 2nd monitor and full-screen. 我在第二个监视器上以全屏形式显示表格。 I want to prevent all other windows from accidently being moved into the second screen and over lapping my form. 我想防止所有其他窗口意外移入第二个屏幕并重叠我的表单。

I also need to make sure that if a window gets moved to the other window and I use topmost, I don't want the other window to get lost. 我还需要确保如果一个窗口移至另一个窗口并且使用最上方,则我不希望另一个窗口迷路。

I want to make the 2nd monitor( or my app ) un-overlappable. 我想使第二台显示器(或我的应用程序)不可重叠。 Not necessarily make it the topmost app. 不一定使其成为最顶级的应用程序。

This is ac# form. 这是ac#形式。

What would be the best way to do this? 最好的方法是什么?

Form.TopMost property: Form.TopMost属性:

A topmost form is a form that overlaps all the other (non-topmost) forms even if it is not the active or foreground form. 最顶层表单是与所有其他(非最顶层)表单重叠的表单,即使它不是活动表单或前景表单也是如此。 Topmost forms are always displayed at the highest point in the z-order of the windows on the desktop. 最上面的表单始终显示在桌面上窗口的z顺序的最高点。 You can use this property to create a form that is always displayed in your application, such as a Find and Replace tool window. 您可以使用此属性创建始终在您的应用程序中显示的表单,例如“查找和替换”工具窗口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM