如何防止全屏窗体覆盖任务栏?

发布于 2024-08-30 16:23:28 字数 128 浏览 1 评论 0原文

有谁知道如何防止我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心意如水 2024-09-06 16:23:28

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

The working area is the desktop area
of the display, excluding taskbars,
docked windows, and docked tool bars.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文