Solved

VFP Visual FoxPro 8 - Creating an EXE that works

Posted on 2010-09-11
14
706 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 41

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
 
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 41

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 41

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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 41

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now