Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a class form
Message
From
14/11/2001 18:21:54
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00579966
Message ID:
00581838
Views:
40
>>>>
>>>>The key word is in bold...why take the chance?
>>Or, put another way, what specific requirement do you have that is best overcome by a public variable?
>
>In projects where I hard-code the form GUI's, it seems (that) runtime won't recognize them unless the name is declared public. I try not to do it, but runtime hiccups - and then I have to.
>

Terry,

I understand the problem. It sounds like you want to have a variable that is visible in various places in the form.

There are at least 2 ways to catch this fox:

1) Use custom properties of the form to hold these values. You could even have a property on the form hold an object reference. Inside of that object, you could have several properties (which act like variables). This object would then be visible everywhere within the form.

2) Or, if you need something that is accessible across multiple forms, use an object (or variable) that is created in the main program (before the forms are launched. Make this object a private variable.

HTH,
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform