我创建了两个WPF应用程序,旨在使用双显示器在同一台服务器上全屏运行。
是否可以指定在哪个屏幕上打开哪个应用程序?
我目前在不同的监视器桌面上有可执行文件,但是理想情况下我想以编程方式控制它。
如果那是不可能的,那么我可以将应用程序移动到WPF Web客户端并在两个全屏Internet Explorer窗口中打开,但我再次需要指定哪些加载在哪些屏幕上。
谢谢
I've created two WPF applications that are designed to run full screen on the same server with dual monitors.
Is it possible to specify which application opens on which screen?
I currently have the executable on different monitors desktop which works but ideally I'd like to control this programmatically.
If that isn't possible, then I could move the application into a WPF web client and open in two full screen Internet Explorer windows but again I'd need to specify which ones load on which screens.
Thanks
最满意答案
您必须将两个exe的Window.StartupLocation设置为手动,然后您必须手动将Window.Top和Window.Left设置为您希望每个显示的监视器的坐标。
您可能希望使用Screen类来确定每个屏幕的位置
http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx
You will have to set the Window.StartupLocation to manual for both of your exe's and then you will have to manually set the Window.Top and Window.Left to the coordinates for the monitor you want each to show up on.
You will probably want to use the Screen class to determine where each screen is at
http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx
更多推荐
发布评论