Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running an .exe inside an .exe
Message
De
04/10/1996 09:26:22
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00009314
Message ID:
00009373
Vues:
23
>I have a vfp program (LBP.exe) that I want to run from within another vfp .exe (MAIN.exe). I have a form in Main.exe that has a command button with the click method set to:
> * -- stuff --
> do lbp.exe
> * -- stuff --
>
>when I run just the form (from the project) it goes and runs LBP, then when I exit LBP, it returns to Main. This is good... that's what I expect... When I compile Main and run Main.exe... clicking on the button starts LBP AND THEN CLOSES LBP and returns me back to main. What's happening???? The reason I have two .exe's is because LBP.exe has to stand alone... MAIN.exe is an umbrella program that will eventually call more .exe's.
>
>Am I missing something here??? Any help is greatly appreciated.... thanks...

It doesn't matter what kind of exe you run from VFP program, anyway you should use RUN command. Also remember following:
1. Any VFP exe must have Wait state: READ EVENTS or Start Modal Form.
2. We cannot use Main.exe as 'umbrella' explicitly, i.e. it will not wait until Lbp.exe finished. Actually you will get two separately running Windows applications.
3. To provide nice coordination between two programs you should make some coding like using timers,Windows API or simply make first program form invisible until the second will be closed.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform