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.

Students Click Here

Activation of Form in Visual Fox Pro

Activation of Form in Visual Fox Pro

Activation of Form in Visual Fox Pro

I am a new comer to Visual Fox Pro and not a professional SW designer. I am designing a SW based on VFP 9.0 for my personal use. I have designed some forms, reports etc NOT USING Project in VFP. My problem is every time I have to load VFP 1st. Then type DO FORM LOGIN in command window. 3rd manually close the command window and properties window.
I want to make an Icon on desktop to directly open my Software without going to VFP command window.
Please held me in this regard.

RE: Activation of Form in Visual Fox Pro


Whai is a SW designer?


RE: Activation of Form in Visual Fox Pro


You might want to get acquainted with the PROJECT MANAGER to manage your main program, forms, reports, menus ... then build an APP or an EXE and run this APP/EXE from the Windows Dektop.


Btw I assume SW = SoftWare



RE: Activation of Form in Visual Fox Pro

Hi Friends,
I think, I could not express my problem.
As you know, I am not a professional software programmer. I am a new comer to the world of visual fox pro 9.0. I have designed some forms and reports using visual foxpro 9.0 through Command Window like MODI FORM login, MODI REPO abc etc. but not through CREATE PROJECT. My problem is, every time, when I want to work through this, (1)-I have to load the visual foxpro, (2)- Have to type in Command Window : DO FORM LOGIN, (3)-after login, manually I have to close Command Window and Properties Windows. Every thing is running fine. But I want to make an ICON on my Desktop, to which, I have to click that ICON and get the LOGIN SCREEN without moving through the said 3 steps. It would be easier to anybody to run the application.
So please help me in this regard.

Thank you

RE: Activation of Form in Visual Fox Pro

Hi Sanjib,

You have expressed your problem perfectly. And there is a solution. But unfortunately it might take a lot more than a forum post to explain it.

Let's start by taking the simplest case. Let's suppose you only have one "main" form in your system. That form might invoke other forms, but let's leave that to one side for the moment. Essentially, what you need to do is to create an executable program (an EXE file) that you can run straight from the Windows desktop. The program will load the form, wait while you interact with it, and then when you are ready to close the form, the program will terminate.

The first thing you need to do is to create a program (a PRG file) that will invoke the form. The program issues a DO FORM command (look it up in the Help) and then a READ EVENTS command.

In your form, you need a way to tell the system that you want to quit. Let's say you have a Quit button in that form. In the Click event of the button, execute CLEAR EVENTS.

OK, you now have the components in place. The next step is to tie them together. To do that, create a project (with MODIFY PROJECT). Add your PRG and your form to the project. (Again ,refer to the Help for details.) The PRG will appear in the Code tab. Right click on it and make sure that Set Main is ticked.

Next, you will build the executable. In the project manager, click the Build button, and select "Win 32 Executable / COM Server", then click OK. You will be prompted for a filename for your executable. Once you have entered that, VFP will create the executable program (the EXE file).

You can now run the executable directly from Windows by double-clicking on it. And you can create a desktop shortcut for it in the usual way.

The above explanation is very much a simplification. There are other details that you will need to address. But I hope this will at least give you a flavour of how to go about it.


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

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! Already a Member? Login

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