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


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: