|
-
Feb 2nd, 2004, 09:06 PM
#1
Thread Starter
Frenzied Member
[VB] CloseWindowByhWnd
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
Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long
Const WM_CLOSE = &H10
Const WM_DESTROY = &H2
Public Sub CloseWindowByhWnd(hwnd As Long)
PostMessage hwnd, WM_CLOSE, 0, 0
PostMessage hwnd, WM_DESTROY, 0, 0
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|