VB Code:
  1. If Form1.WindowState = vbMinimized Then
  2.      'it's minimized
  3. Else
  4.      'it has other state
  5. End If

vbMaximized if the form's full screen