Private Declare Function IsZoomed Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function IsIconic Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Form_Resize()
Dim minflag As Long, maxflag As Long
minflag = IsIconic(Me.hwnd)
maxflag = IsZoomed(Me.hwnd)
If minflag <> 0 Then
MsgBox "最小化"
ElseIf maxflag <> 0 Then
MsgBox "最大化"
Else
MsgBox "正常"
End If