Results 1 to 5 of 5

Thread: Saving settings [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    185

    Resolved 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

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    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.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    185

    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?

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    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.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    185

    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
  •  



Click Here to Expand Forum to Full Width