3 replies
by brian Accepted solution
by scott_heath Accepted solution
I would save the data to a XML file.
You can use the form load event to read the data from the XML file and set the values of the text and drop down boxes.
I'm not sure what you mean by "in the exact order and create a file name for it".
But if I understand correctly you can make XML elements by control name (i.e. TextBox1 or whatever you chose) so it would always put that value back in that control.
Let me know if you need more help than that.
Also check out: http://xmlfiles.com/xml/
Regards,
Scott
by tony hopkinson Accepted solution
Could be a bad move that. Rejig the form in version 2, and you ned to convert any files froma previous version, or refuse to load them.
There are open aand save dialogs to use to set and get the file.
The form has a controls property, wich is list of all the things on it.
So you could loop through that, test for the classes you use
so TextBox.Text and ComboBox.Items and Selected index. If you use XML
etc
Loading it you just load the file into an XMLDocument Class, rip through it and look for a control of the same name, if you find it set it.
PS Controls is those contained by the form. If you have panels, or some other container.
Forms contains the panel, and panel contains the textbox.
HtHs
This discussion is closed to new replies.
Trending Software posts
Sort by Trending