Option Explicit
Private Declare Fun(百度傻)ction SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const WM_SYSCOMMAND = &H112
Private Const SC_MAXIMIZE = &HF030&
Private Const SC_MINIMIZE = &HF020&
Private Const SC_RESTORE = &HF120&
Private Sub Command1_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0
End Sub
Private Sub Command2_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0
End Sub
Private Sub Command3_Click()
SendMessage hwnd, WM_SYSCOMMAND, SC_RESTORE, 0
End Sub
Private Declare Fun(百度傻)ction SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const WM_SYSCOMMAND = &H112
Private Const SC_MAXIMIZE = &HF030&
Private Const SC_MINIMIZE = &HF020&
Private Const SC_RESTORE = &HF120&
Private Sub Command1_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0
End Sub
Private Sub Command2_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0
End Sub
Private Sub Command3_Click()
SendMessage hwnd, WM_SYSCOMMAND, SC_RESTORE, 0
End Sub