Minimizing,maximizing and restoring the form programatically
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
' Minimize the form window
Me.WindowState = FormWindowState.Minimized
Thread.Sleep(2000) ' wait for 2 seconds
' Restore the form window
Me.WindowState = FormWindowState.Normal
Thread.Sleep(2000) ' wait for 2 seconds
' Maximize the form window
Me.WindowState = FormWindowState.Maximized
End Sub
