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!

Running a Form Automatically

Status
Not open for further replies.

moppsy

IS-IT--Management
Dec 22, 2004
22
US
How do I run a VFP program without clicking on the "Run" exclamation point or using the "Do Program" on the top tools menu. I use a shortcut on the desktop called main.scx. When I click on it I want the form to run automatically. I don't want to build an application. I simply want to click on the shortcut and have the form run automatically. Any ideas? Thanks in advance....
 
You can use a compiled program (fxp) to launch your form. e.g. "main.fxp" can DO FORM C:/Path/Main... just make sure fxp files as associated with VFP.

Brian
 
Brian, could you give me a little more information. Won't we have to make a prg first in order to make a fxp? If so, we could not make a prg. Also, what do you mean when you say to make sure the fxp files are associated with VFP. Thanks for your help.
 
Yes a fxp is a compiled prg. Why can't you make a prg? Are you saying you don't have a full install of VFP on the PC?

File associations can be edited from explorer. fxp is usually associated with VFP, but if not it can be edited from explorer -> tools -> folder options -> file types.
 
We did go ahead and make the fxp but when we tried to execute it we got the following error: object main cannot be found" Also, why do we keep getting a consistent "do you want to save changes to form desgner" when we execute from the shortcut "main.scx". I want to be able to run the form automatically. If creating a fxp will work then I am getting the error mentioned above "object main cannot be found" Thanks.
 
I am confused. Do you mean you want the program to run from an icon, from Windows Explorer, or each time you start VFP?

If you want a program to launch automatically from VFP put this line in your config.fpw file

command=do main.prg

and it will run automatically when VFP starts.

Otherwise we need more info.

 
crewchiefpro5, in what directory do we place the config.fpw file. We did not create a project and from the documentation I've read so far concerning this file it looks like we need to create a project. Also, I want the icon to run automatically when I click on it or when I open VFP. Either scenario is fine. I just want one them to run automatically when I click or open it. Thanks for your help so far.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top