Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RUN command
Message
 
À
18/05/1998 08:53:06
Tom Hammer
Pennwell Publishing
Tulsa, Oklahoma, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00099389
Message ID:
00100098
Vues:
35
>George,
>
>BTW, is there an easy way to close this application I've launched with ShellExecute when my VFP application ends.
>
>Thanks
First, download the Is_Run program in the files section (in Win 32 and other APIs). Use the Is_Run32 function to retrieve the window handle of the open application. Simply pass the function the known portion of the title bar.

Then you need the following:
DECLARE INTEGER SendMessage IN Win32API;
  INTEGER hWnd, INTEGER uMsge, INTEGER wParm, INTEGER lParm
* Call Is_Run32 with the title (lctitle in this case)
lnhWnd = Is_Run32(lctitle)
* Close the application - 16 = WM_CLOSE
= SendMessage(lnhWnd, 16, 0, 0)
I also seem to recall that WM_QUERYENDSESSION also works, but it's a little more complex to use.

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform