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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32 Executable won't run

Status
Not open for further replies.

SteveMacPSU

Programmer
Sep 8, 2005
32
0
0
US
Hi Everyone,

I am new to this forum and come in as a very experienced FoxPro 2.6 for DOS programmer. I am finally ready to make the jump or leap as it might be to VFP (8.0). My problem is in creating a VFP .exe. I created a simple form to search for a specific record and then a report to print out the information. I built the Win32 executable and placed the proper run-time files in the appropriate places and all was well. Users could run this application fine. I decided to add a main menu and add other options to print other reports. I again built the .exe and although it runs fine from my computer with VFP 8.0 installed it will not run on other computers as a stand-alone app. I noticed that the size of the .exe went from 1,224 kb to 3,611 kb by just adding one more form and some command buttons. Any ideas?
 
What is the users' experience when the exe fails to run? (ie, are there error messages?)

Perhaps you used an ActiveX button instead of native foxpro controls, and the activeX .OCX isn't registered on their computers.

---

The simple .Exe that did run: Are you sure that was built using VFP8, and not an earlier version?

--

Are you sure you got ALL the VFP8 runtime files?
See the list here:
FWIW: I have found that the VFP8 ISExpress Runtime Modules (MSM's) to simply NOT WORK. I include them in my ISE distributions, but I also place the VFP runtimes expressly into my app's folder.

This link might help you too:
- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Q1: The exe loads(I can see it briefly in Task Manager) and then is kicked out.

Q2: The simple exe was indeed created in 8.0.

Q3: I have verified that I have all the run-time files.

Did you note the size difference in the exes? I'm thinking that that is where the isuee lies.
 

Hi Steve,

Welcome to the forum ... and to Visual FoxPro.

Have you got a READ EVENTS in your program anywhere?

In general, a VFP application consists of a main program (a PRG) which invokes the main user interface -- either a menu or a form. Once it has launched the interface, you need to tell it to wait while the user is interacting with it. That's what READ EVENTS does. (It's a bit like a foundation read in Foxpro/DOS, but a good deal simpler.)

If you think that might be the answer, I suggest you check the Help for READ EVENTS and also for CLEAR EVENTS.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

Thanks for the response. I did not have a read events in my main.prg. I added it but it not make a difference. Here is the "MAIN" prg.....


DO FORM "mainmenu.scx"
READ EVENTS

mainmenu.scx has some command buttons and also an exit button that clears the events and releases the form.
 

Steve,

Does the user actually see the form? Does it appear briefly and then disappear, or does it not appear at all? Do they see the outer VFP window at all?

Mike




__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

No, the form does not appear at all, the exe is loaded for less than a second. Is the exe size of over 3,000kb a problem?

Steve
 
Steve,
Is this form "Modal"? Does it run correctly from inside the VFP IDE? (i.e. DO myapp.exe )We've got VFP executables as large as 35 MB, so no 3 MB is not a real problem.

Rick
 
The size won't be an issue (our apps exe is 15Mb!!).

If you go into task manager, is there any evidence of the program running?

I like work. It fascinates me. I can sit and look at it for hours...
 
Rick,

The app runs fine from inside VFP; I checked the form it was set for modeless....

Thanks,
Steve
 
Slugger,

The program loads briefly and then disappears in task manager.

Steve
 
All,

I have a 4th quarter update, the app does load into memory and stays there. No form is displayed however.

Steve
 

Steve,

Let me get this right. The app is visible in Task Manager, but nothing appears at all on the screen?

If that's right, check to see if you have a Config.FPW file. If so, does it contain the line SCREEN=OFF? If so, delete that line (or delete the entire Config file). (The file might be bound into the EXE, in which case rebuild the app after deleting the file.)

Or, check to see if you have _screen.visible = .f. anywhere in your code.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

There was indeed a line screen=off in the config file. I took it out and it works fine now. One other small problem, it won't quit VFP after I click the command button to quit the app. I do clear events and release the form, the form does disappear. It gives me the Foxpro screen with nothing enabled and says that I can't quit Foxpro when I click the "X" in the top right corner. I know I'm close. Thanks for everyone's quick resonse to my problems. I'm looking forward to progressing in this new environment.

Steve
 

Steve,

Glad to hear that idea worked. SCREEN=OFF sometimes gets put into the Config file by the application wizard. That must have been what happened in this case.

Re the other problem ... what you described is the behaviour you expect if the event loop is still in force (after you do READ EVENTS but before CLEAR EVENTS.) Are you sure your CLEAR EVENTS has been executed?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
It sounds like the form is modal, so your CLEAR EVENTS is happening before you ever hit READ EVENTS.
 
Everything is working fine. Thanks to all that answered my rookie questions. I will be back! This is a great forum....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top