在VB.NET中隐藏开始菜单和开始按钮

问题描述 投票:3回答:2

我正在设置我的控制台全屏,但我还想使用Visual Studio 2010隐藏VB.NET中的任务栏和开始按钮

谢谢

vb.net vb.net-2010
2个回答
1
投票

隐藏任务栏的一种方法是结束资源管理器进程。

For Each p As Process In Process.GetProcesses
    If p.ProcessName = "explore" Then
       p.Kill()
    End If
Next

完成后,您将不得不重新启动资源管理器进程。

Process.Start("explorer")

0
投票

我结束了使用Sam解决方案,但我做了另一种方式,因为使用Process.Kill并没有阻止explorer.exe自动重启。

不得不这样使用taskkill:

System.Diagnostics.Process.Start("taskkill.exe", " /f /im explorer.exe")

然后当您关闭应用程序时,再次调用explorer.exe:

System.Diagnostics.Process.Start("C:\Windows\explorer.exe")

我不得不使用完整路径因为调用“explorer.exe”没有恢复任务栏。

© www.soinside.com 2019 - 2024. All rights reserved.