|
-
Nov 16th, 2001, 10:04 AM
#8
-= B u g S l a y e r =-
Originally posted by SeaHag
I found this...
VB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Const WM_CLOSE = &H10
Private Sub Command1_Click()
Dim intHwnd As Long
intHwnd = FindWindow(vbNullString, "Calculator") ' Must match the caption of the window exactly
SendMessage intHwnd, WM_CLOSE, 0&, 0&
End Sub
Works great except for stuff running in the taskbar...
Arggg
u find that less messy than what I suggested ???
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
|