Information générale
Catégorie:
Codage, syntaxe et commandes
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)
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement