Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms don't execute from .exe file 1

Status
Not open for further replies.

jgeidl

IS-IT--Management
Jan 13, 2005
12
0
0
US
I have an application that I haven't touch in a couple years. The client has asked that I make some changes. It is presently running on their system just fine. I am generating a .exe file which has worked fine in the past and works fine from within the FoxPro environment: ie. Do my.exe. The application runs fine if I simply start from the main prg in the project too. The issue arises when I try and run the exe from outside the VFP9 IDE. The program executes and runs til it hits an error because the first few forms ask for login infor and since they don't execute the application errors out gracefully as it should.

I have the vfp9r.dll and vpf9renu.dll files in the c:\windowd\system32 folder as well as the folder where the .exe resides.

I have tried this under Win XP and Win7 (under which I am now developing) and have the same problem.

Since the app runs OK inside VFP I have to beleive that this is an issue with something external that I am not including.

Your thoughts are greatly appreciated!!!

Jim

Thoughts?
 
Jim,

You've described the problem very clearly, except for the following:

The program executes and runs til it hits an error because the first few forms ask for login infor and since they don't execute the application errors out gracefully as it should.

Why don't these forms execute? Are you saying that the program is unable to load them? Or that the forms themselves generate the error? Can you perhaps clarify what you are seeing?

By the way, if you are satisfied that even one line of your main program is executing, that suggests that the runtime files (VFP9.DLL, etc.) are not the cause of the problem.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Mike,

How about soem pseudo code adn then a little more explaination.

do setvariables.prg
do somethingelse.prg
do form frmtellaboutappliation (doesn't appear)
do form frmlogin (doesn't appear)
do validateuser.prg

This last program tests the info the user would have entered in the frmlogon to be sure this is a good user and it gracefully closes the application if it isn't. Well, since the frmlogon never shows up no user info is entered therefore the application just shuts down.

I tested by inserting several other forms in prior to the tow I have exampled here and none of them appears. They don't hang or give an error, it just skips them as it the line of code to execute them doesn't exist.

It appears that no form will execute properly. As I said htis all works fine if I do it within the FoxPro IDE.

Jim
 
Further info.

I thought maybe compiling on Win7 was contributing to the problem so I move the entire project to a Win XP computer and recompiled the .exe and that made no difference.

Jim
 
Verify you have the correct program (or form in rare instances) as the startup program. It could be the app is calling the form directly without calling the startup program.

Jim
 
To clarify. Open the project and make sure the correct program is selected as the startup prior to building the app.

Jim
 
Jim (jgeidl),

Thanks for the clarification. So, you're saying that the application runs, but the forms are invisible.

Check to see if you have _SCREEN.Visible = .F. somewhere in the code. Or, look for SCREEN = OFF in the Config.FPW.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Mike,

Great call! Actually the config.fpw did have screen=off in it but the real issue is that the application was not supposed to be using that config file. Digging a little deeper I discovered that the config file that was supposed to be used was no where to be found.

Thanks again,

Jim, K6JMG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top