1 Attachment(s)
Three Easy ways to re-initialize your data for your program
Here are three easy ways to re-initialize your program data without having to reload your entire program. It uses classes to hold all your data and all you need to do is to destory the class and reload it and Wah-Lah all your data in your program is re-initialized. Of course you need to start off with this concept in your coding for it to work, but it is well worth it if you need to reset your data.
There are three ways it can accomplish this:
1 - You want to reset the program/form to a saved state anytime in the program
(Form_Save & Form_Restore)
2 - You want to re-initialize all variables without reloading the program/form.
3 - You want to restore default settings of the controls which is stored in using the tag fields of each control.
This method has some great side effects. You can use multiple data classes to hold your data and not have all of your data loaded into memory at the same time. You can load only the data/variables that you need for a section of your app when you need them saving on memory consumption.
If you have any questions about this or additions just post them here.