Collections in forms
-
Hello, I am a student playing with windows forms. I am using .net 2003 windows forms with C++. This is new to me, I bought a book on .net 2003 but my problem was not covered. The problem is this. I want to make a collection that my windows form has access to. Kind of like a database front end. Except I want to make several collections available. I haven't found where to set these up at yet. I can create collections in the form click events but I'd much rather have the collections load the files that hold their information on starting the application. Can anyone stear me in the right direction with maybe a book or wich forum to ask my question in? I've been browsing the forums and haven't seen anything related yet. Thanks, Matt
-
Hello, I am a student playing with windows forms. I am using .net 2003 windows forms with C++. This is new to me, I bought a book on .net 2003 but my problem was not covered. The problem is this. I want to make a collection that my windows form has access to. Kind of like a database front end. Except I want to make several collections available. I haven't found where to set these up at yet. I can create collections in the form click events but I'd much rather have the collections load the files that hold their information on starting the application. Can anyone stear me in the right direction with maybe a book or wich forum to ask my question in? I've been browsing the forums and haven't seen anything related yet. Thanks, Matt
Matt, Basically, you need a collection class in your project that deals with the collections. You can then instantiate as many of them as you like as member variables in your form class. To initialize them, put the instantiation (constructor) in the Form_Load method of your form instead of the Form_Click events.