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

Building an exe

Status
Not open for further replies.

shawnwmorris

Programmer
May 4, 2017
36
US
first off I want to thank everyone here for helping me out so much in the past few months. I am attempting to build a suite of tools to help me with my job. I am very thankful for the help.

I have created a small program that uses 1 single form to execute 3 SQL queries and put the result of the queries into 3 different textboxes. I am attempting to create an exe for this form so that the user will not have to load VFP 9.0 they can just click the button and see what results are. I have gone through the build wizard but when I attempt to launch the resulting exe the screen flashes and nothing else happens.

Does anyone have an article or tutorial on creating an exe for other users to use my program?
 
You would probably benefit by spending some time with the Free, On-line VFP tutorial videos at: Free VFP Tutorials

Of particular interest might be the videos titled:
Building a Simple Application - Pt. 1 through Pt. 6

Good Luck
JRB-Bldr

 
Glad to hear you have made good progress with your development.

The problem you mentioned is one of the most common ones that newcomers to VFP see. For more details of the problem, and a solution, see faq184-4232.

Given that your application is basically just one form, another solution would be to make the form modal (set its WindowType property to 1).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I was able to get the exe to work, however I now have 1 more question
1. When clicking on the exe the VFP window opens, is it possible to have just the form show up and nothing else?
 
The "VFP window" is _SCREEN. You could set _SCREEN.Visible = .F., but it'll shortly flash and maybe even hide your form, as it is a child form of screen.

So to replace the screen with your own top level form needs a few steps. Take a look at faq184-6512

Here's a possible way to get this going without needing to restart. I assume your form is an SCX, so run the SCX version of the code creating a single form application project. Then replace the main form with your form in the forms folder, change main.prg accordingly to start your form with its file name and just apply the major settings to your form:
1. Set the ShowWindow property to 2
2. Write [tt]Clear Events[/tt] into the Unload() event of the form.

You could also make the form modal, as Mike suggested earlier, but not when wanting a top level form, top level forms never are modal, they are the main parent windows and should allow (nonmodal) access to child forms and a menu, if it exists, so Windows (the OS) disregards the modal setting for top level forms. You need the pair of READ EVENTS and CLEAR EVENTS commands for the non modal form to stay until you close it.

Bye, Olaf.
 
Hey guys this has helped me immensely. Thanks for the pointers and the help.

Now I have another question. Please me know if it requires a new thread:

MY exe is not working precisely how I'd like.

MY exe will take a policy number (Primary key on most tables) and the run 3 sum queries and put the sum into text boxes on the form. I use this info to make some changes to tables where needed. Once I make changes I run the form again (from the exe) and the old values are still displaying. If I close the exe out and then run it again it will still show the old values.

If I try to modify the form and run the form in the IDE the form will update with the new values one the command button is clicked.

Does any one know why this is?
 
I'm pretty sure that you have several copies of the table(s) in question.

And by the way, yes, you should have made a new thread.
 
Yes, please start a new thread. You are more likely to get an answer to your new question that way, plus it will help other users when searching or browsing the threads. When composing your question for the new thread, don't assume that the person reading it will have seen the thread that we are in at the moment.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top