Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VFP Visual FoxPro 8 - Creating an EXE that works

Posted on 2010-09-11
14
Medium Priority
?
725 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 30

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 43

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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 30

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 43

Accepted Solution

by:
pcelba earned 2000 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 43

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 30

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 43

Expert Comment

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

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 30

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

971 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