INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Building an exe

Building an exe

(OP)
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?

RE: Building an exe

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

RE: Building an exe

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: Why does my application jus flashes and closes when I start it..

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

RE: Building an exe

(OP)
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?

RE: Building an exe

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: How To Make a Single-Form-Application

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 Clear Events 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.

RE: Building an exe

(OP)
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?

RE: Building an exe

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.

RE: Building an exe

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

RE: Building an exe

(OP)
Starting a new thread

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close