问题描述
是否可以在 Windows 7 中为您的应用保留屏幕边缘附近的屏幕区域?它的行为类似于 Windows 任务栏(即最大化的窗口不会与其重叠).
Is it possible to reserve a screen area near an edge of the screen for your app in Windows 7? It would behave similar to the Windows taskbar (i.e. maximized windows would not overlap with it).
我正在编写一个适当支持多显示器的任务栏应用程序.主要目的是在每个屏幕上显示一个任务栏,其中仅包含该屏幕上的应用程序.没有现有的解决方案(Ulltramon、DisplayFusion) 我知道 Win 7 的工作,没有一个是开源的.
I'm writing a taskbar app with proper support for multiple monitors. The primary purpose is to show a taskbar on each screen containing only the apps on that screen. None of the existing solutions (Ulltramon, DisplayFusion) I know of work for Win 7, and none are open source.
C# 代码会很好,但也欢迎任何提示.
C# code would be nice, but any hints are appreciated as well.
推荐答案
我不确定如何直接在 C# 中执行此操作,但在本机代码中您可以使用 SPI_SETWORKAREA 调用 SystemParametersInfo.这就是任务栏、侧边栏等应用程序可以防止最大化窗口重叠的方式.
I'm unsure of how to do this directly in C#, but in native code you can call SystemParametersInfo with SPI_SETWORKAREA. This is how apps like the taskbar, sidebar, and so on can prevent maximized windows from overlapping them.
http://msdn.microsoft.com/en-us/library/ms724947.aspx 是 SystemParametersInfo 的文档.
http://msdn.microsoft.com/en-us/library/ms724947.aspx is the documentation for SystemParametersInfo.
http://social.msdn.microsoft.com/forums/en-US/winforms/thread/9fe831e5-ccfb-4e8d-a129-68c301c83acb/显示此方法的 P/Invoke 签名.
http://social.msdn.microsoft.com/forums/en-US/winforms/thread/9fe831e5-ccfb-4e8d-a129-68c301c83acb/ shows P/Invoke signatures for this method.
这篇关于在 Windows 7 中保留屏幕区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)