Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close Another Application
Message
De
03/04/2000 04:10:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Close Another Application
Divers
Thread ID:
00354201
Message ID:
00354201
Vues:
61
I have followed the instructions in the KB #449 from George Tasker to close another application from within VFP.

#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)

I use Is_run function to get the window handle.

But I still have problem because the application is not removed completely from Windows task list and Windows task bar, its window is still on the taskbar and also in the task list, so I have to do one more step that is Ctrl-Alt-Del and End Task to close the application window.

Thanks for your help,
Regards,
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform