Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting hWnd from Task ID

48 views
Skip to first unread message

David Campey

unread,
Nov 22, 1999, 3:00:00 AM11/22/99
to
Greetings,

I need to kill an app I started [using Shell()] but

I need to know how to resolve the Task ID returned by Shell() to a
window handle

so that I can send it the close signal
[using SendMessage(hWnd, WM_CLOSE, 0, 0)]
[declared with : 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]

Is this the best way of doing this?

Thanks,
Campey


Mattias Sjögren

unread,
Nov 22, 1999, 3:00:00 AM11/22/99
to

David,

Try this:

Obtaining the hWnd of an Application Started with Shell()
http://www.mvps.org/vbnet/code/system/shellhwnd.htm


Mattias

________________________________________________
Mattias "beezo" Sjögren, MCP
mattiass @ hem.passagen.se
http://home1.2.sbbs.se/mattias.sjogren/sw/
Please send questions/replies to the newsgroups

0 new messages