Hi All,
I have been looking at the Screen class in vb.net, as I want users to be able to define which screen a particular form is displayed on. I have worked out how to do this, however there is a small problem.
If in Windows I go to the standard Display Settings I can see one of my monitors showing as number 1 and the other as number 2.
However in the vb.net code the I cannot determine which one is which. If I use the DeviceName property it returns "\\.\DISPLAY1" and "\\.\DISPLAY2", however this is the opposite way round to the numbers shown in the Windows Display Settings.
When I give users the choice as to which screen to show the form on, if they choose screen 1, I need to make it screen 1 as per the Windows Display settings, not Display1 as defined in the Screen class.
Can anyone advise me of how to find this information so that I can display the form on the correct screen.
Many thanks,
Trevor.
I have been looking at the Screen class in vb.net, as I want users to be able to define which screen a particular form is displayed on. I have worked out how to do this, however there is a small problem.
If in Windows I go to the standard Display Settings I can see one of my monitors showing as number 1 and the other as number 2.
However in the vb.net code the I cannot determine which one is which. If I use the DeviceName property it returns "\\.\DISPLAY1" and "\\.\DISPLAY2", however this is the opposite way round to the numbers shown in the Windows Display Settings.
When I give users the choice as to which screen to show the form on, if they choose screen 1, I need to make it screen 1 as per the Windows Display settings, not Display1 as defined in the Screen class.
Can anyone advise me of how to find this information so that I can display the form on the correct screen.
Many thanks,
Trevor.