如何防止全屏窗体覆盖任务栏?
有谁知道如何防止我的 C# winform 覆盖/位于任务栏顶部?我的表单的边框样式已设置为“FixedToolWindow”,这似乎导致了这种情况。当用户使表单最大化时,我考虑过降低表单的高度,但这不起作用,因为人们可能有不同大小的任务栏。
Does anyone know how I can prevent my C# winform covering/going on top of the taskbar? My form's border style has been set to "FixedToolWindow" which seems to cause this. I thought about reducing the height of the form, when the user makes the form maximized, but that wouldn't work as people may have different size taskbars.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Screen 类将为您提供两个屏幕边界和工作区域。工作区域是减去任务栏的边界,因此只需将表单设置为与屏幕的 工作区域
The Screen class will give you both screen bounds and working area. The working area is the bounds minus the taskbar, so just set your form to be the same location as the Screen's WorkingArea