I didn't create the from using either way. I copied the form from another program which is in K:\ drive and paste to other location/drive F:\. From there I start to modify the form, and run the form. The form works fine in the beginning. After that it came out program error when I try to create a command or menu to link up the form. Therefore I tried to copy the form and paste to C:\Program Files\Microsoft Visual Studio\Vfp98. Then I try to run the form from my F:\. Now the form able to run. Will I face any problem later on when I create exe or distribution file if i'm using the same form Kindly advice. Thanks.
Create a project (you'd do anyways to create an exe) and add your forms to it (and other files needed). When you build your form/prg/menu etc files are compiled directly into the exe and thus your pathing problem ends. While working within IDE to prevent that error you either need to hardcode the path or set path to folders where those files are.
In VFP, when you create (and save) a form it actually saves two files on disk:
exord001.scx
exord001.sct
What the error is saying is that it cannot find the form (when running an APP from the IDE) or when the compiler tries to compile the form into and EXE .
To create a form in the IDE (Integrated Development Environment) you can either do it through thte menus with FILE|NEW|FORM or from the command box typing CREATE FORM exord001 (or MODIFY FORM exord001). Is that what you did to create it
Create menu or command
gourmete
Hi,
I didn't create the from using either way. I copied the form from another program which is in K:\ drive and paste to other location/drive F:\. From there I start to modify the form, and run the form. The form works fine in the beginning. After that it came out program error when I try to create a command or menu to link up the form. Therefore I tried to copy the form and paste to C:\Program Files\Microsoft Visual Studio\Vfp98. Then I try to run the form from my F:\. Now the form able to run. Will I face any problem later on when I create exe or distribution file if i'm using the same form Kindly advice. Thanks.
Jeremy Conner
Dan.Jurden
I did that but I got this error message when I run the form.
Program Error
File ‘C:\program files\microsoft visual studio\vfp98\exord001.scx’ does not exist
Pls advice. Thanks
malignate
In the Click() method of the button:
DO Form xyz
or place the same code in the command section of the meny entry.
For all the options of DO Form see:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dv_foxhelp9/html/a727f12a-4d9f-45ca-aa01-c1bea7de9749.asp
HDoucet
I assume "exord001" is the name of your form.
In VFP, when you create (and save) a form it actually saves two files on disk:
What the error is saying is that it cannot find the form (when running an APP from the IDE) or when the compiler tries to compile the form into and EXE .
To create a form in the IDE (Integrated Development Environment) you can either do it through thte menus with FILE|NEW|FORM or from the command box typing CREATE FORM exord001 (or MODIFY FORM exord001). Is that what you did to create it
little_girl
Just return your form in the work dir and set path:
SET DEFAULT TO ('"'+SUBSTR(SYS(16), AT("C:\", SYS(16), 1), RAT("\", SYS(16), 1)-AT("C:\", SYS(16), 1)+1)+'"')
Write this in main.prg or config.fpw or load event on the form.