vb.net 全屏运行,没有开始菜单
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14554186/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Run in full screen with no start menu
提问by KangarooRider
Possible Duplicate:
Making Winforms Fullscreen
可能的重复:
使 Winforms 全屏
I am making a VB Form that i want to run in full screen, as in covering the start menu and task bar. right now i am using
我正在制作一个我想全屏运行的 VB 表单,就像覆盖开始菜单和任务栏一样。现在我正在使用
Me.Size = SystemInformation.PrimaryMonitorSize
Me.WindowState = 2
Me.Location = New Point(0, 0)
Me.TopMost = True
Me.FormBorderStyle = 0
but the start menu still shows. I am assuming this is because the window is just maximized and not really in "full screen"
但开始菜单仍然显示。我假设这是因为窗口只是最大化而不是真正处于“全屏”状态
is there any way i can cover the start menu in vb to make the program run in full screen?
有什么办法可以覆盖vb中的开始菜单以使程序全屏运行吗?
回答by NYCdotNet
There appear to be some side-effects going on here. If you just reorder the lines, it should work fine. In fact, setting the WindowState to maximized or enabling "always on top" do not appear to be explicitly required to achieve this effect.
这里似乎有一些副作用。如果您只是重新排序行,它应该可以正常工作。事实上,似乎不需要将 WindowState 设置为最大化或启用“始终在最前面”来实现此效果。
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.Location = New Point(0, 0)
Me.Size = SystemInformation.PrimaryMonitorSize
'Me.WindowState = 2
'Me.TopMost = True

