Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing an other application with postmessage or sendmes
Message
De
29/08/2000 09:01:30
 
 
À
29/08/2000 07:58:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00410161
Message ID:
00410189
Vues:
16
>Hi
>
>I am trying to colse an application using the above api functions, but I always get a return value of zero, can you tel me what I am doing wrong
>
>lnOk=PostMessage (thisform.lnActiveWindowHandel, WM_CLOSE, 0, 0)
>

A few questions - what is in lnActiveWindowHandle (ie are you sure it's a valid handle?)

What do you have defined as WM_CLOSE (are you sure the value is defined properly?)

What is the error returned by GetLastError()?

You should probably read the MSDN Library documentation on PostMessage() if you aren't sure of the answers; the information you give is inadequate to analyze the error.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform