Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

howto use second monitor via code?

Status
Not open for further replies.

TravisLaborde

IS-IT--Management
Nov 4, 2002
84
US
If I were to write a simple image-viewing application, where thumbnails are shown on the "main" window, and you can click on an image to have the full image appear - could I cause that full image to appear on the second display instead of on the main display?

How would I go about that? Is there some magic "form.open(InSecondaryDisplay)" call that I haven't yet found?

Can anyone point me in the right direction here?

Thanks!
Travis
 
Thanks for the reply!

I tried the snippet in that thread and I had some trouble. I had to make the slight modifications below. This is VB.NET 2003 code:

Dim myOtherForm As New Form2
With myOtherForm
.StartPosition = FormStartPosition.Manual
.DesktopLocation = Screen.AllScreens(0).Bounds.Location
.WindowState = FormWindowState.Maximized
.Show()
End With

This works great. I have no idea why my second monitor is monitor 0 and my primary was monitor 1, but I don't care :)

Now, can anyone tell me how to make it FULLSCREEN?

Thanks,
Travis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top