I've got a class called Initializer that I use the initialize global variables. It has properties that allow other classes to retrieve these variables.
Here's my problem: I must create an instance of this class to initialize everything. I suppose the best place to do that would be in the very first form that loads, mine's called "MainMenu()". Thing is, as I transfer control to other forms, I dispose of those I don't need anymore so I don't waste resources. Does my instance of Initializer() get destroyed when I dispose of the form that created it?
How do you initialize global variables, and how do you access them? I tried just making a variable Public, thinking that all classes everywhere could access it, but other classes don't seem to recognize it. And I don't see anything like main() or winmain() in a windows forms application, so I have no idea where to stick these variables.
Yeah, I am new to VB.NET, but please help!! Thanks a bundle. If you help me now, I promise to give you a million dollars when I am a multi billionnaire like Bill Gates.
0 · ·