Hello All,
In our dual monitor environment, I am having a difficult time trying to accomplish opening a form (Doc Viewer) on the opposite screen.
Currently I am able to open it on the right screen automatically using this code:
Dim myScreens() As screen = screen.AllScreens
If myScreens.Length = 2 Then
Dim screen As screen
'Send Doc Viewer Form to Second Monitor: Right Monitor = 1
Me.DesktopLocation = screen.AllScreens(1).Bounds.Location
screen = Windows.Forms.Screen.AllScreens(0)
Else
'Send Doc Viewer Form to Second Monitor: Left Monitor = 0
Me.DesktopLocation = screen.AllScreens(0).Bounds.Location
End If
If the user opens the app on the right screen I want the form to open on the left… My goal is to give the user the flexibility to have the main app on either monitor and have the (Doc Viewer) respond accordingly. Any insight would be greatly appreciated.
Thanks.
?
?
In our dual monitor environment, I am having a difficult time trying to accomplish opening a form (Doc Viewer) on the opposite screen.
Currently I am able to open it on the right screen automatically using this code:
Dim myScreens() As screen = screen.AllScreens
If myScreens.Length = 2 Then
Dim screen As screen
'Send Doc Viewer Form to Second Monitor: Right Monitor = 1
Me.DesktopLocation = screen.AllScreens(1).Bounds.Location
screen = Windows.Forms.Screen.AllScreens(0)
Else
'Send Doc Viewer Form to Second Monitor: Left Monitor = 0
Me.DesktopLocation = screen.AllScreens(0).Bounds.Location
End If
If the user opens the app on the right screen I want the form to open on the left… My goal is to give the user the flexibility to have the main app on either monitor and have the (Doc Viewer) respond accordingly. Any insight would be greatly appreciated.
Thanks.
?
?