Multiple Monitors : Screen identify

Xancholy

Well-known member
Joined
Aug 29, 2006
Messages
143
Programming Experience
Beginner
Windows has a screen identify function that throws up a big 1 on a transparent background on monitor#1, 2 on monitor#2, etc on a multiple monitor setup.

How can I achieve that using vb.net ?
 
I'd check out Screen.AllScreens

VB.NET:
Dim monitor As Screen
For Each monitor In Screen.AllScreens
    If Not monitor.Primary Then
        Me.Bounds = monitor.Bounds
        Exit For
    End If
Next
Me.WindowState = FormWindowState.Maximized

Should put the form in your first non-primary display.
 
Back
Top