|
-
Jun 13th, 2007, 08:59 AM
#1
Thread Starter
Addicted Member
Saving settings [RESOLVED]
Is there a "proper" way to save settings that a user may have changed in the program, so that they may be loaded the next time? Should I just save them to a text file and parse the data in the file every time I load the program? Or is there a better/easier way?
Anyone have any quick examples or reasons to do it one way or another?
Thanks.
Last edited by pjrage; Jun 13th, 2007 at 01:49 PM.
Reason: RESOLVED
-
Jun 13th, 2007, 09:08 AM
#2
Re: Saving settings
Go into the Projects menu, at the bottom you have project properties, click there.
Click the Settings tab and create some settings you want to be able to set. You need to give the setting a name and a datatype.
Now, put a textbox on your form. In the property window to the right, find the property called ApplicationSettings and expand it, enter the PropertyBinding property.
Now you'll get a list of properties. Select the 'Text' property and select the setting you want to bind it to in the dropdown list to the right.
-
Jun 13th, 2007, 09:40 AM
#3
Thread Starter
Addicted Member
Re: Saving settings
Cool, thanks! I'll try it out.
Can you do custom datatypes also this way?
Is this the "right" way to do it?
-
Jun 13th, 2007, 09:43 AM
#4
Re: Saving settings
This is definitly a correct way of doing it. You could also use these settings manually, ie not binding them to a property. I dont think its possible to use custom datatypes though.
-
Jun 13th, 2007, 01:48 PM
#5
Thread Starter
Addicted Member
Re: Saving settings
This works great, thanks again!
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
|