Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop software on w2k
Message
De
18/11/2002 05:27:32
 
 
À
13/11/2002 07:20:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00722030
Message ID:
00723769
Vues:
12
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
Fil
Voir

Click here to load this message in the networking platform