Solved

VFP Visual FoxPro 8 - Creating an EXE that works

Posted on 2010-09-11
14
717 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Cloud Training Guides

FREE GUIDES: In-depth and hand-crafted Linux, AWS, OpenStack, DevOps, Azure, and Cloud training guides created by Linux Academy instructors and the community.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

623 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