General information
Category:
Coding, syntax & commands
Hi Kouakou,
I can't remember where I found it, but this works on XP.
I have checked and the process is removed from the list of running tasks.
But you have to know the text that appears in the title bar.
Alan
* Get handle for the window to be closed.
DECLARE INTEGER FindWindow IN Win32API;
STRING @lpClassName, STRING @lpWindowName
* Passing 0 as the class name causes all classes to
* match. The title text must match exactly and is
* case sensitive.
* lctitletext is the title bar text to search for
lnhWnd = FindWindow(0, @lctitletext)
* lnhWnd will be greater than 0 if a match is found.
* Use SendMessage to #DEFINE WM_DESTROY 0x0002
#DEFINE WM_CLOSE 0x0010
DECLARE INTEGER SendMessage IN Win32API;
INTEGER hwnd, INTEGER uMsg,:
INTEGER wParam, INTEGER lParam
* lnhWnd is the Window handle to close
* Close and allow prompt to save changes
= SendMessage(lnhWnd, WM_CLOSE, 0, 0)
* Close without allowing prompt
= SendMessage(lnhWnd, WM_DESTROY, 0, 0)
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only