|
-
Oct 28th, 2009, 02:44 PM
#1
Thread Starter
Member
[RESOLVED] Managing the users application settings
I have a simple application with a main form and an options dialogue. The options dialogue has various TextBox's and drop downs where the user can make changes and OK/Cancel buttons for when they're done.
On the FormClosing event of the main form, I save these settings to an XML file. When the program is first run, the settings are loaded back into the options dialogue. The application reads settings directly from the controls in the options dialogue during run time.
Is there a better way or any built in functionality to manage this stuff?
If this is the best way, is there any easy way to have any changes cleared when the cancel button is clicked? i.e. without storing all of the settings in variables when the options dialogue is shown and then changing them back when the cancel button is clicked?
-
Oct 28th, 2009, 03:29 PM
#2
Re: Managing the users application settings
You don't need to manage your own XML file - look under the Project menu under your project's settings (the bottom menu option) and then the Settings tab.
Here you'll find a built-in mechanism for storing user settings. There's also a hyperlink at the top of the tab which explains all about how they work and the various option.
-
Oct 28th, 2009, 04:15 PM
#3
Thread Starter
Member
Re: Managing the users application settings
That's brilliant, I thought there must be something like this built in. Many thanks.
-
Nov 23rd, 2009, 06:05 PM
#4
Member
Re: Managing the users application settings
Hello, I see myself making a lot of progress, but sometimes I can't get things.
I made an application that copies files from network to the pc it is installed.
The application will be used in multiple computers.
I made a small form with user settings, such as automatic update or manual,
default time, or user time etc.
The thing is that I can't undestand how application settings can save these options form me.
For example to turn off automatic updates, I just stop the appropriate timer.
How to save this in app settings?
Thanks a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|