Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Shutting down a running EXE from another EXE -- Window Title known 1998-08-04 -- Jim Kane The steps involved are to 1st get the hwnd or windows handle for the frame
or main window of the app to be shut down, then post a wm_close message to
that hwnd.
Step 1 is simple if the text on the title line of the app is always the
same - just use the findwindow() api:
wm_Close equate(10H)
titlestr cstring(80)
hwnd unsigned
Titlestr = 'Calculator' !or what ever it is
hwnd=findwindow(titlestr,)
Then once you want a hwnd:
PostMessage(hwnd,wm_close,0,0)
You can get the prototypes for the api calls from the winapi program with
cw
Today is November 23, 2024, 2:18 am This article has been viewed 35200 times.
|
|