VFP generated EXE file runs, then immediately quits 
Author Message
 VFP generated EXE file runs, then immediately quits

I have VFP professional, and when I generate an executable from one of my
projects, it seems to work fine.  When I go and try to run it from the
File Manager, the Runtime version loads up, displays the form, then
immediately quits.  I Had no problems when I compiled the Sample App
(tastrade.pjx) into an executable.  
Does anyone have any idea when the problem is?

Nick Carruthers



Fri, 16 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits

Quote:

>: I have VFP professional, and when I generate an executable from one of
my
>: projects, it seems to work fine.  When I go and try to run it from the
>: File Manager, the Runtime version loads up, displays the form, then
>: immediately quits.  I Had no problems when I compiled the Sample App
>: (tastrade.pjx) into an executable.  
>: Does anyone have any idea when the problem is?

>I have had the exact same problem.  Anyone have a solution?

>Thanks!

How about a foundation read.  :)

Sorry, I couldn't resist.

Quote:
>Dean

--
Ski.
----------------------------------------------------------------
Houston Rockets 1993-4 & 1994-5 NBA Champions
----------------------------------------------------------------
Mark S. Swiencki
 Systems Analyst - M. D. Anderson Cancer Center

 Frozen Rope Software - Custom FoxPro Consulting & Development


 ---------------------------------------------------------------


Fri, 16 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits
: I have VFP professional, and when I generate an executable from one of my
: projects, it seems to work fine.  When I go and try to run it from the
: File Manager, the Runtime version loads up, displays the form, then
: immediately quits.  I Had no problems when I compiled the Sample App
: (tastrade.pjx) into an executable.  
: Does anyone have any idea when the problem is?

I have had the exact same problem.  Anyone have a solution?

Thanks!

Dean



Fri, 16 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits

Quote:

>I have VFP professional, and when I generate an executable from one of my
>projects, it seems to work fine.  When I go and try to run it from the
>File Manager, the Runtime version loads up, displays the form, then
>immediately quits.  I Had no problems when I compiled the Sample App
>(tastrade.pjx) into an executable.  
>Does anyone have any idea when the problem is?
>Nick Carruthers


My test exe ran fine off a desktop icon in Win95. Have not tried Win
3.x. Check if VFP300.ESL is in \windows\system in Win95. Plus you need
win32s if running Win 3.x. No idea how that works yet.


Sat, 17 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits
You need to have a read events somewhere in your code, do a help on it
so that you understand it purpose.

david

Quote:

>: I have VFP professional, and when I generate an executable from one of my
>: projects, it seems to work fine.  When I go and try to run it from the
>: File Manager, the Runtime version loads up, displays the form, then
>: immediately quits.  I Had no problems when I compiled the Sample App
>: (tastrade.pjx) into an executable.  
>: Does anyone have any idea when the problem is?
>I have had the exact same problem.  Anyone have a solution?
>Thanks!
>Dean



Sun, 18 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits

Quote:

>>: I have VFP professional, and when I generate an executable from one of
>my
>>: projects, it seems to work fine.  When I go and try to run it from the
>>: File Manager, the Runtime version loads up, displays the form, then
>>: immediately quits.  I Had no problems when I compiled the Sample App
>>: (tastrade.pjx) into an executable.  
>>: Does anyone have any idea when the problem is?

>>I have had the exact same problem.  Anyone have a solution?

>>Thanks!

>How about a foundation read.  :)

Foundation read is provided for 2.x compatibility.  Since VFP is event
driven, you would probably require a WAIT EVENTS statement for the
executable to start the event handler.

But I am not too sure if WAIT EVENTS is the exact command.  It was
discussed at the Singapore DevCon.  Too bad I can't check as I have
not receive my copy of VFP yet.  

+++++++++++++++++++++++++++++++++++++++++++++
Joe Tan

+++++++++++++++++++++++++++++++++++++++++++++



Sun, 18 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits


Quote:
>: I have VFP professional, and when I generate an executable from one of my
>: projects, it seems to work fine.  When I go and try to run it from the
>: File Manager, the Runtime version loads up, displays the form, then
>: immediately quits.  I Had no problems when I compiled the Sample App
>: (tastrade.pjx) into an executable.  
>: Does anyone have any idea when the problem is?

>I have had the exact same problem.  Anyone have a solution?

>Thanks!

>Dean

I struggled with READ EVENTS & CLEAR EVENTS for hours. I found a couple of
references to it in the Developers guide, but no command READ EVENTS in the
Language reference. I finally found enough info in the on line help to figure
out how to use it, but why isn't this documented better? I used it to replace
the hand coded event loop in my menu and solved my problem.

I guess I'll get used to the differences but I'm getting too old for this!

Marty



Sun, 18 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits

Quote:



>>>: I have VFP professional, and when I generate an executable from one of
>>my
>>>: projects, it seems to work fine.  When I go and try to run it from the
>>>: File Manager, the Runtime version loads up, displays the form, then
>>>: immediately quits.  I Had no problems when I compiled the Sample App
>>>: (tastrade.pjx) into an executable.  
>>>: Does anyone have any idea when the problem is?

>>>I have had the exact same problem.  Anyone have a solution?

>>>Thanks!

>>How about a foundation read.  :)

>Foundation read is provided for 2.x compatibility.  Since VFP is event
>driven, you would probably require a WAIT EVENTS statement for the
>executable to start the event handler.

>But I am not too sure if WAIT EVENTS is the exact command.  It was
>discussed at the Singapore DevCon.  Too bad I can't check as I have
>not receive my copy of VFP yet.  

Yeah, I know.  It was a joke.

--
Ski.
----------------------------------------------------------------
Houston Rockets 1993-4 & 1994-5 NBA Champions
----------------------------------------------------------------
Mark S. Swiencki
 Systems Analyst - M. D. Anderson Cancer Center

 Frozen Rope Software - Custom FoxPro Consulting & Development


 ---------------------------------------------------------------



Sun, 18 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits
Quote:

>  I have VFP professional, and when I generate an executable from one of my
>  projects, it seems to work fine.  When I go and try to run it from the
>  File Manager, the Runtime version loads up, displays the form, then
>  immediately quits.  I Had no problems when I compiled the Sample App
>  (tastrade.pjx) into an executable.  

In the first Program executed in the project, make sure you execcute a READ EVENT command.  In the development mode,
the read event is already in place (to hold the project acnd command window, among others.)  If you don't start your project
with a prg, do so with the READ EVENT code.  You may also want to do your system settings, execute a main menu and a
background screen there.  VFP is radically different than 2.6, and the READ EVENT command takes the place of setting up a
foundation read.  A real time saver!!!

Good Luck
Brian A. Kamp



Mon, 19 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits
Martin

Quote:
>> I struggled with READ EVENTS & CLEAR EVENTS for hours.

This has been the case since FP2.0.  When you create a runtime version, it
ends immediately unless there is some sort of READ- usually (what used to be
called) a foundation read, or a READ EVENTS in VFP.

Regards

JR



Mon, 19 Jan 1998 03:00:00 GMT  
 VFP generated EXE file runs, then immediately quits

Quote:
>>>>: projects, it seems to work fine.  When I go and try to run it from the
>>>>: File Manager, the Runtime version loads up, displays the form, then
>>>>: immediately quits.  I Had no problems when I compiled the Sample App
>>>>: (tastrade.pjx) into an executable.  
>>>>: Does anyone have any idea when the problem is?

>>>>I have had the exact same problem.  Anyone have a solution?

>>>>Thanks!

You need to include the command READ EVENTS towards the end of your
main program followed by whatever cleanup code you want performed.
This'll start the event handler. When you want to quit issue the
command CLEAR EVENTS and the program will fall through and execute the
cleaup code.

Jorge.

Jorge Martinez
Programmer/Analyst
San Francisco Unified School District



Sun, 25 Jan 1998 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. App closes immediately when run as .EXE

2. Win 3.x won't quit after VFP app runs from batch file

3. Problems with EXE files generated with Professional version of VFP 3.0b

4. Application quit immediately

5. QUIT doesn't QUIT in EXE

6. Running a VFP exe from another VFP exe

7. Icon for EXE file after running Setup.exe

8. Running a VFP exe file

9. Behaviour of .EXE generated files

10. Problem generating CROSS-TAB table in EXE file using VFPXTAB

11. Generate exe file from FoxPro2.6 project

12. VPW 3.0b-generated EXE file system requirements

 

 
Powered by phpBB® Forum Software