TimmyLee Posted February 13, 2004 Posted February 13, 2004 I am working on a little VB.NET program, and I have alot of entry fields for whoever is using the program. How can I have it so they can save their settings so next time they open the program It uses the settings they gave it? And then in turn how could I have it so they could after doing that, return it to the original default settings? Any help on this would be greatly appreciated. By the way I would prefer the settings not be saved to something like a .log or .txt file. Quote
Moderators Robby Posted February 14, 2004 Moderators Posted February 14, 2004 You can save settings to the registry or an XML file. Quote Visit...Bassic Software
TimmyLee Posted February 14, 2004 Author Posted February 14, 2004 I kinda figured that, however, I have not ever done that before and am unsure as how to do it. Quote
Moderators Robby Posted February 14, 2004 Moderators Posted February 14, 2004 Which? Quote Visit...Bassic Software
*Gurus* Derek Stone Posted February 14, 2004 *Gurus* Posted February 14, 2004 If you save the settings in a class instance you can easily serialize it to file (save and load). Quote Posting Guidelines
jorge Posted February 14, 2004 Posted February 14, 2004 To save data to the regestry use: SaveSetting("Name of app", "Folder", "keyname", "value") to retreve it: GetSetting("Name of app", "Folder", "keyname", "default value if key doesn't exist") Quote Jorge - http://www.blackdot.be/?page=apache.htm
Moderators Robby Posted February 15, 2004 Moderators Posted February 15, 2004 If you have lots of settings to save then Dereks' approach would be best. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.