我怎样才能prevent其他应用程序窃取的重点是什么?应用程序、重点、prevent

2023-09-03 03:57:23 作者:看你背影走

我有一个全屏窗口设置为true最上面的属性。当应用程序改变它的WindowState属性,即使它具有活动焦点我的窗口会自动最小化。例如,code以下举例说明了问题。窗口3秒后已停用,从最小化变为正常,尽量减少其他全屏应用程序。

I have a fullscreen window with the Topmost property set to true. Whenever an application changes its WindowState property, my window is automatically minimized even though it has the active focus. For example, the code below exemplifies the problem. 3 seconds after the window is deactivated, it changes from Minimized to Normal, minimizing the other fullscreen application.

// Topmost = false
private void Form1_Deactivate(object sender, EventArgs e)
{
    System.Threading.Thread.Sleep(3000);
    this.WindowState = FormWindowState.Normal;
}

有没有一种方法,以preserve在这种情况下全屏窗口的WindowState属性?我希望用户选择,以尽量减少全屏应用程序,所以我想阻止其他程序窃取焦点。

Is there a way to preserve the fullscreen window's WindowState property in such a case? I want the user to choose to minimize the fullscreen app, so I want to stop other programs from stealing the focus.

推荐答案

您可能需要调查的Kiosk模式。

 
精彩推荐
图片推荐