除了我的程序,如何最小化所有打开的窗口?

时间:2015-10-18 07:43:44

标签: c# windows visual-studio

我希望我的程序是唯一显示的程序,有没有办法做到这一点?

我想通过运行像

这样的东西
WindowState = ALL.Minimized;

更新

我制作了这样的剧本

Set shell = wscript.CreateObject("Shell.Application")
Shell.MinimizeAll

将其命名为Mini.vbs 然后我在Visual Studio中使用了这段代码

   {
InitializeComponent();
TopMost = true;
System.Diagnostics.Process.Start("c:/mini.vbs");
        }

它有效,但它不是最好的解决方案。

1 个答案:

答案 0 :(得分:0)

您可以在创建表单时将TopMost属性设置为True

public Form1()
{
 InitializeComponent();         
 this.TopMost = true;
}

古德勒克。

相关问题