是否可以在 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 中保留屏幕区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!