config file - How to ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Devlon

    config file - How to ?

    Hi,

    I would like to create a config file to store some basic user data like
    default path, and some other options ...

    Does anyone know which is the best solution ? Using an xml-file ? Or using a
    basic txt-file ? Or are there other solutions to remember user settings ?

    thanx

    John


  • Greg

    #2
    Re: config file - How to ?

    "John Devlon" <johndevlon@hot mail.comwrote in message
    news:1hvxh.3270 99$Ko7.6479988@ phobos.telenet-ops.be...
    Hi,
    >
    I would like to create a config file to store some basic user data like
    default path, and some other options ...
    >
    Does anyone know which is the best solution ? Using an xml-file ? Or using
    a basic txt-file ? Or are there other solutions to remember user settings
    ?
    >
    thanx
    >
    John
    Yep. Use Application Settings. Choose Settings from your Project's
    Properties. Select User for the Scope. All your User preferences can be
    added here. You can even update them via code etc.

    Cheers.


    Comment

    • Noone

      #3
      Re: config file - How to ?

      I am not saying this is the best solution but I am using the registry
      to store the info. It is actually pretty easy and you don't have to
      worry about having a seperate config file around.

      Just a possibility. : )

      -Josh

      On Mon, 05 Feb 2007 00:56:29 GMT, "John Devlon"
      <johndevlon@hot mail.comwrote:
      >Hi,
      >
      >I would like to create a config file to store some basic user data like
      >default path, and some other options ...
      >
      >Does anyone know which is the best solution ? Using an xml-file ? Or using a
      >basic txt-file ? Or are there other solutions to remember user settings ?
      >
      >thanx
      >
      >John
      >

      Comment

      • Patrick Parent

        #4
        Re: config file - How to ?

        I would not use the registry as Vista does not seems to like that.

        Comment

        • John Devlon

          #5
          Re: config file - How to ?


          Hi Greg,

          Thanx for the great advice...

          Do you know where I can find a good manuel on the web on how to read and
          write to the user preferences ?

          Many Thanx

          John


          Comment

          • Greg

            #6
            Re: config file - How to ?

            "John Devlon" <johndevlon@hot mail.comwrote in message
            news:Wz7yh.3303 22$Io7.6477857@ phobos.telenet-ops.be...
            >
            Hi Greg,
            >
            Thanx for the great advice...
            >
            Do you know where I can find a good manuel on the web on how to read and
            write to the user preferences ?
            >
            Many Thanx
            >
            John
            It's very basic. Add in your user preferences (I change their Roaming
            property from False to True).

            To read a value: eg,
            sAppVers = My.Settings.App Vers
            sDatabaseDir = My.Settings.Dat abaseDirectory
            sInputDir = My.Settings.Inp utDirectory

            To save a new value: eg,
            My.Settings.App Vers = "1.1"
            My.Settings.DBN ame = "northwind. mdb"
            My.Settings.Sav e()

            Very easy. Cheers.


            Comment

            Working...