展开全部
标准模块里:
Public 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
Public Const WM_SYSCOMMAND = &H112
Public Const SC_CLOSE = &HF060&
Form1里:
Private Sub Command1_Click()
PostMessage Me.hwnd, WM_SYSCOMMAND, SC_CLOSE, 0
End Sub
参考http://blog.csdn.net/subo86/archive/2009/02/03/3860096.aspx
Public 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
Public Const WM_SYSCOMMAND = &H112
Public Const SC_CLOSE = &HF060&
Form1里:
Private Sub Command1_Click()
PostMessage Me.hwnd, WM_SYSCOMMAND, SC_CLOSE, 0
End Sub
参考http://blog.csdn.net/subo86/archive/2009/02/03/3860096.aspx
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询