Results 1 to 2 of 2

Thread: [2005] Application Settings

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2006
    Posts
    36

    [2005] Application Settings

    How is this used?

    I want to save many filepaths and folderpaths when closing the app and load them when starting up. I know I can use a file to load and save the settings, but I was looking around and saw a thread on Application Settings. However, in the thread it had nothing on how to use them, and i need to know how I would go about saving some custom settings.

    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Application Settings

    Open the Settings tab of the project properties and add a setting of type String. If you call it MyStringSetting you get and set its value via My.Settings.MyStringSetting in code. The stored values will be loaded into My.Settings at startup and saved at shutdown. See the MSDN documentation for My.Settings for more info.

    Note that only User-scoped settings a read/write. Application-scoped settings are read-only. If you need to save Application-scoped settings you do so using the ComfigurationManager and Configuration classes. See the MSDN documentation for the ConfigurationManager.OpenExeConfiguration method for more info.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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