Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim Loc As New Point
Dim WL As String
Dim HL As String
Dim Maxed As String = FormWindowState.Normal
Dim FullScreen As String = False
If FullScreen = False Then
FullScreen = True
If Me.WindowState = FormWindowState.Maximized Then
Me.WindowState = FormWindowState.Normal
Maxed = FormWindowState.Maximized
End If
Loc = Me.Location
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
WL = Me.Width
HL = Me.Height
Me.Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height.ToString()
Me.Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width.ToString()
Me.Location = New Point(0, 0)
End If
End Sub
Par contre, cela fonctionne que sur un seul écran (primaire) mais pas pour le deuxième écran étendu.