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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving field values

Status
Not open for further replies.

Cybershmuck

Technical User
Jan 21, 2005
21
I have a set of field values from a GUI that i want to retain after I close the program.


When I open up the program again the text boxes should be populated with the values from the last session.

Is there a simple way of doing this?

Thanks in advance.

Stanza
 
Save the values in the registry. On opening, if there are values in the registry, populate the dialog with those values.

Alternatively, save them in a local file. This will stop registry bloat.
 
Any examples you got to show me how to do that?

Thanks,

Stanley
 
in a local file (say in same dir as executable) have a file which contains a list of the following values

textBox1
textBox2
textBox3
etc....

On launch open file, read values and initialise the boxes, you need to update the file on application close as well.

I'm not sure how to do it via the registry - bit would be interested to know how if you find out!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top