Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WSH to close specific windows by window title?
Message
 
 
À
04/08/2000 08:27:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00400866
Message ID:
00400953
Vues:
13
>>How would I close specific windows using WSH? The window title is a given.
>
>You could use the Wscript.Shell's AppActivate method to bring it to foreground, and then use the SendKeys method to send it an {alt-F4}; it assumes that the target accepts that. Better to use Sendmessage to issue a WM_QUIT to the application's main hWnd.

Ed,
I tried sending a window the WM_QUIT message but nothing happened. I then tried sending it the WM_CLOSE message and it terminated. What is the window supposed to do when it receives the Quit message?
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform