Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to run an EXE from a main form???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00420714
Message ID:
00421466
Vues:
24
Since your code is after the call to READ EVENTS, you have to not only release the form you are working on but also issue a CLEAR EVENTS to give the control back to your program. So, your command button should look like this:

proc = "SCA"
THISFORM.release
CLEAR EVENTS

Hope I've helped you in any way!

Stephane.




>I have the following code in a main .PRG
>
>
>**********************************************************
>* Main Program for MASTER.EXE
>*
>* Copyright 2000. EMSG, Inc.
>*
>**********************************************************
>
>* Run the main form and establish the event loop
>
>SET EXCLUSIVE OFF
>SET SYSMENU OFF
>SET TALK OFF
>SET STATUS OFF
>SET STATUS BAR OFF
>SET CURSOR ON
>SET MEMOWIDTH TO 80
>SET DEFAULT TO \master
>
>PUBLIC VARIABLE mast_cap && Forms title bar for Incident #, Patient Name, and Age
>mast_cap = ""
>
>PUBLIC PROC t_id
>PROC=" "
>t_id=""
>
>do while proc <> "QUIT"
>do form master
>READ EVENTS
>if proc="SCA"
>   SHOW WINDOW SCREEN
>   DO \arrest\new_arr.exe
>endif
>if PROC="AED"
>   SHOW WINDOW SCREEN
>   DO \arrest\aed.EXE
>ENDIF
>ENDDO
>
>SET ALTERNATE OFF
>SET ALTERNATE TO
>SET PRINT OFF
>SET CONSOLE ON
>
>CLOSE ALL
>RELEASE ALL
>DEACTIVATE WINDOWS ALL
>QUIT
>
>
>on my master from I have a series of command buttons that go to various applications - EXEs.
>
>The command button has
>proc = "SCA"
>THISFORM.release
>
>My question is when I press the command button to go to SCA.EXE I get a blank white screen and the SCA.EXE doesn't go any further. What do I need in my SCA.EXE opening form Init or Load to accept this calling program properly. And what do I need in the SCA.EXE form Exit button to return to this calling program?
>
>Thanks for the help. I am anxious to get it working, but don't want to waste hours trial and error. Thanks again!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform