General information
Category:
Forms & Form designer
>
>In summary, using public variables just to share data among form methods is not convenient. However, a few public variables in the main program may be justified. It should be possible to have a single public variable, an "application object", to store different kinds of data for your application; all kinds of data can be stored in different properties of the application object. (An application object might store user name and user level, a list of open forms, or any other information which you need once for the entire application.)
I'm not much of a theorist, and maybe we're saying the same thing differently, but it seems to me that public variables should be used only to share information between applications. If I want to create a variable which is scoped to the entire application, it would be declared Private in the main program.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only