积极答复者
c# 无边框窗体最大化时挡住了系统的任务栏

问题
答案
-
private void Form9_Load(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.None; this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); this.WindowState = FormWindowState.Maximized; }
http://blog.csdn.net/zx13525079024- 已标记为答案 Paul Zhou 2011年9月8日 9:42
-
你好,
测试了开心的代码,基本可以实现你的要求。根据MSDN文档http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.workingarea.aspx
WorkingArea will return the entire area of the screen if the Windows Taskbar is set to Auto-Hide, no matter whether the Taskbar is currently displayed or not.
如果任务栏设置的auto-hide,不管任务栏是否显示,WorkingArea都是返回的全屏区域。
Paul Zhou [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Paul Zhou 2011年9月8日 9:42
全部回复
-
private void Form9_Load(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.None; this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); this.WindowState = FormWindowState.Maximized; }
http://blog.csdn.net/zx13525079024- 已标记为答案 Paul Zhou 2011年9月8日 9:42
-
你好,
测试了开心的代码,基本可以实现你的要求。根据MSDN文档http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.workingarea.aspx
WorkingArea will return the entire area of the screen if the Windows Taskbar is set to Auto-Hide, no matter whether the Taskbar is currently displayed or not.
如果任务栏设置的auto-hide,不管任务栏是否显示,WorkingArea都是返回的全屏区域。
Paul Zhou [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Paul Zhou 2011年9月8日 9:42