WPF Dual Monitor Application Overlay

北城以北 提交于 2019-12-11 06:28:57

问题


I looked at this thread to create a dual monitor application in WPF: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/5d181304-8952-4663-8c3c-dc4d986aa8dd where a WPF Window will be displayed on each of the two monitors.

The issue I am having is that the windows are overlapping - they are both being displayed on the same screen. The Debugger tells me that there are 2 Displays in the System.Windows.Forms.Screen.AllScreens array and that the Top and Left values of the working areas of each screen are 0, -1600 and 0, 0 respectively (which seem to be accurate to me).

Both screens have a resolution of 1600x1200.

Has anyone come across a similar issue before? The monitors are set to 'Extend desktop to this display' in the Screen resolution settings.

Thanks!


回答1:


I managed to display a window in the second monitor (placed at the right of the primary) by using the following code:

window.Left = System.Windows.SystemParameters.VirtualScreenWidth / 2;



来源:https://stackoverflow.com/questions/13689644/wpf-dual-monitor-application-overlay

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!