WindowState Event

  • Thread starter Thread starter Ron
  • Start date Start date
Something like this would work:

Const WM_MOVE As Integer = &H3
Const WM_SIZE As Integer = &H5
Const WM_WINDOWPOSCHANGED As Integer = &H47

Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc(m)
Select Case m.Msg
Case WM_MOVE, WM_SIZE, WM_WINDOWPOSCHANGED

If Me.WindowState <> FormWindowState.Minimized Then
'do something
End If

End Select

End Sub

Jerry
 
Back
Top