Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
From one VFP application closing all other VFP app running
Hi
Not an easy question today.
We open a VFP application and this application is making some critical update so we need to close all other vpf app that are open (sometime three to five different vfp app).
- first we want to loop to open application
- for each application, close this application
- if the application ask question about saving data and don't close we must know that the application didn't close (returning a flag if this work or not)
Finally we will advise user if one or more application didn't close and wait until he will close by himself those application.
Under my name I will put a sample of the code we try but sometime this work and sometime not. Each time we are having different result
Any idea
Thanks
Michel
* sample code (only a part)***************************
If tlClose
* nThreadID is the ThreadID member passed back through a PROCESSINFO structure
#DEFINE WM_QUIT 0x12
= PostThreadMessage(nWindowThreadID, WM_QUIT,0,0) > 0
lnFerme = .F.
ltest = ""
set step on
Do While lnFerme = .F.
ll=GetExitCodeThread(nWindowThreadID,0)
EndDo
Read Timeout 0.5
EndIf
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement