Solved

VFP Visual FoxPro 8 - Creating an EXE that works

Posted on 2010-09-11
14
710 Views
Last Modified: 2012-05-10
Hello Experts,

It's been a long time since I've had to create a VFP EXE from scratch.  I'm doing this for a friend and need a quick solution. . .

The program, which consists of a prg and an scx file, runs great in VFP.  When  I compile it into an EXE and run it on my dev computer, it makes a tone and doesn't show anything.

I have a project that has start.prg as the main program.

My start.prg shows:
_Screen.visible=.F.
set talk off
on shutdown do close
do form TextChange
read events

My TextChange form has the following properties set:
Desktop is True
ShowWindow is 2 (as top level form)

the close.prg has:
clear events
quit

The TextChange.scx form has one button that'll crunch some data if the user clicks it.  To get out of the program, they merely click the close (X) in the top left of the window and it closes the program.  The thing is, in the EXE, I never see the TextChange.scx form.  I double-click on the EXE and here a little bonk and that's it.

Help

jr
0
Comment
Question by:jruhe
  • 5
  • 5
  • 4
14 Comments
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33653618
Is th start.prg set as the main file of the pjx? Or is the form set as the main file? That is one wrong setting that could cause the bahvior you describe. Otherwise I see you have a read events, the form is top level and desktop, should work. Perhaps try with _screen.vsible = .t. and see if the form then shows up within the screen, then there may be something in load, the de or init of the form changing it to be a "normal" form living in the screen.

Bye, Olaf.
0
 
LVL 4

Author Comment

by:jruhe
ID: 33653755
Start.prg is the main program.  _Screen.visible=.t. (with changing the ShowWindow to 1) yields the same result.  The form has no code at all except under the only object, the button on the form.

Anything else you can think of would be greatly appreciated!

jr
0
 
LVL 42

Expert Comment

by:pcelba
ID: 33653862
It seems your program does not start at all...

Place following command at the start.prg beginning:

WAIT WINDOW "I've started..."

Other observation could be to look at running processes in Task Manager.
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33653875
You hear a "bonk". That's typically due to an error message. Look behind the windows explorer perhaps. The runtime files could be missing and you only get an error message saying so.

Bye, Olaf.
0
 
LVL 42

Accepted Solution

by:
pcelba earned 500 total points
ID: 33653878
You should check if all necessary run-time libraries are available: http://fox.wikis.com/wc.dll?Wiki~VFP8RuntimeFiles
0
 
LVL 4

Author Closing Comment

by:jruhe
ID: 33654266
That's what it was--an errant dll.

Thanks very much!
0
 
LVL 42

Expert Comment

by:pcelba
ID: 33654274
You are welcome but you should rather split points because Olaf answered your question when I've been searching for a web link.
0
 
LVL 4

Author Comment

by:jruhe
ID: 33654743
Hmmm.  Although I appreciate Olaf''s effort, your answer was the correct one.  That's an interesting question (I haven't asked many questions, and they've been slam-dunk or certainly split in the past).  Is it more appropriate to give the points to the person who answered correctly, or all the people who answered?  I'll re-assign if you really think it's best that you split them.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33655983
I don't mind. pcelba has given you a link to the runtime files additionally to just telling you it might be the runtime files missing.

Bye, Olaf.
0
 
LVL 42

Expert Comment

by:pcelba
ID: 33656749
OK, thanks Olaf.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33660004
One more advice: Test an exe on the development computer first. Where VFP is installed the runtimes are installed too. You can see the exe works and then it's quite easy to see and say it's the runtimes missing, when testing on another computer.

Bye, Olaf.
0
 
LVL 4

Author Comment

by:jruhe
ID: 33666499
Thanks guys--I really appreciate it.  Actually, I found out that the computer that I was using had some kind of copied version of VFP on it, although my colleague had a legal version of the product.  So not even the dev computer had the runtimes on it!  I tested it on one of my old computers that had a good copy on it and it worked, so we reinstalled on the "dev" computer and no problem!  It worked great.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33666804
I see.

Yes, VFP works, if you simply copy the program files folder of foxpro, the runtimes are under \Common Files\microsoft shared\VFP, you don't need them to work inside the IDE though. As a VFP license is bound to a user and not a computer or cpu that's a great way to always have a vfp copy with you, it also works from a USB pen drive.

Bye, Olaf.

0
 
LVL 4

Author Comment

by:jruhe
ID: 33682261
Wow!  Thanks Olaf--that's good to know!

Joy
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question