Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form with Public/local/private memory variables
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00451344
Message ID:
00451352
Views:
18
Larry

Thanks for your help. This also helps me see why variables are not visible throughout. I will try what you have suggested.

regards David


>When you don't use Public, the variables go out of scope at the end of the Load event. In order to fix this without using public variables, create form level properties and use these where you are using the variables.
>
>To create form-level properties while in the Form Designer, go to Form - New Property.
>
>Just to explain, when a form instantiates, it does so in a "non-linear" way. The sequence of events is Load - Init - Show - Activate - Gotfocus (LISAG). However, it is important to note that the Load runs, then Init, then Show, etc. One does not call the other; each method runs from beginning to end and then the internal VFP engine runs the next in the sequence. So any variable created in one is not visible to any other unless it is made public.
>
David Wheeldon
Previous
Reply
Map
View

Click here to load this message in the networking platform