Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing form properties to procedure files?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Passing form properties to procedure files?
Miscellaneous
Thread ID:
00452903
Message ID:
00452903
Views:
83
I only know a little about VFP programming.

I have an app. which has a main form, and a separate procedure.prg file. The app. works fine, but
I have been trying to modernize my code. I originally had a range of memory variables, all declared public. They could all easily be seen by the procedure.prg where all my functions & procedures are stored.

I have now been replacing all my public memory variables, and making them properties of the form instead.

My problem is I don’t know what the best way to pass these variables (form properties) to the procedure file, or make them visible to the procedure file from anywhere on the form(other than declaring them public). The procedure file will not allow thisform.myproperty code. I have had to repeatedly use code such as

Store Thisform.Myparam to myparamx
Myfunc = Myfunc1(myparamx)

I seem to have to do this on every one of the pages of the pageframe, because MYPARAMX is invisible to all the other pages. I have to call on it in several places on the form.

Is there an easier way?
Is it still standard practice to use a seperate .prg procedure file, with code in the form such as SET PROCEDURE TO myprocedure.prg?
Is it somehow possible to include the code in procedure.prg as part of the form?

Regards David
David Wheeldon
Next
Reply
Map
View

Click here to load this message in the networking platform