Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Define variables in forms

Status
Not open for further replies.

alisaif

ISP
Apr 6, 2013
418
AE
Hi

Where is the ideal place to define the memory variables in forms, init or load event same like private and public in Dos. And it is released automatically after releasing the form or we have to define release all.

Thanks

Saif
 
If the variables need to be accessible throughout the various Form Methods, then it would be best to make them Properties of the Form itself.

As such they can be initialized in the Init Method, modified anywhere within the Form and used anywhere within the Form.

Then when the Form is Unloaded, they are automatically 'released' since they go away with the Form itself.

Good Luck,
JRB-Bldr
 
Thanks for the quick reply, I got it very well!

Saif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top