Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Const WM_CLOSE = &H10
Private Sub Command1_Click() PostMessage Me.hwnd, WM_CLOSE, 0&, 0& End Sub
你的声明: Declare Function SendMessage Lib "user32" Alias "SendMessageA" (a As Long, b As Long, c As Long, d As Long) As Long 我的声明: Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal
hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As
Long) As Long