How can i move my form to a secondary monitor?
Printable View
How can i move my form to a secondary monitor?
If in a dual-display setup, I imagine you get the bounds of the primary screen , and set the x,y location of the form to greater than the x bound of the primary display.
VB Code:
Me.Location = _ New Point(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Y)
let me know if that works...
it works.. IF your secondary monitor is set to the right side of the primary...
you can reposition your secondary monitor to be on top of the other (thus having to move the mouse out of the top of the screen) or to the left of the screen... :S
isnt there a way to just put it on the other monitor?
(ofcourse dragging helps but my app has to do it on his own :S
hmm ok another question is how to get info from the secondary screen anyway :S
Well, IF, the system has two monitors:
This SHOULD do it, but let me know because im curious myself.
VB Code:
Me.Location = New Point(Screen.AllScreens(1).Bounds.X, Screen.AllScreens(1).Bounds.Y)
Like a Glovaaaah (ace ventura :P)
works great thank u :)... lets add that to my snippet library :P thanks :)
I'm gona have to get me a dual-display setup for coding some time (got one at work, but not home).
well i have it at work too.. and found an old 15'' and have an ati radeon 9700 pro.. thus i thought hey why not make use of it :D..
VB Code:
If Screen.AllScreens.Length > 1 Then _ Me.Location = New Point(Screen.AllScreens(1).Bounds.X, Screen.AllScreens(1).Bounds.Y)
Should be that I guess in case there is only one display.