How to make it use a configuration file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AndrewRenn
    New Member
    • Sep 2008
    • 2

    #1

    How to make it use a configuration file?

    I want to make a program that uses a config file, like, you have something like this in config.ini
    [Main]
    program1=D2.exe
    program2=WoW.ex e
    program3=Wc.exe


    Etc, like taht, and then have when the program is ran, it checks config and sets like Button 1="config.ini[program1]" or something like that, but I don't know hwo to do it..
    thanks , if you understand what i'm saying :)
  • jg007
    Contributor
    • Mar 2008
    • 283

    #2
    are you using vb6 or vb.net ?

    if it is vb.net then it is easier to use I find it easier to use my.settings and you can then set the settings

    see here -

    http://msdn.microsoft.com/en-us/library/cftf714c.aspx

    I am not sure if you can do this in vb6, also I am not sure hoe vb6 handles xml files as that may be another way you do it.

    also see here -

    Comment

    • AndrewRenn
      New Member
      • Sep 2008
      • 2

      #3
      I'm not sure what I am using to be honest.. I have Visual Basic 2008 Express Edition

      Comment

      • jg007
        Contributor
        • Mar 2008
        • 283

        #4
        Originally posted by AndrewRenn
        I'm not sure what I am using to be honest.. I have Visual Basic 2008 Express Edition
        that is VB .Net

        for that I find it easiest to use thet my.settings stuff so just see the top link for more on that .

        the only thing to know is that doing this places the xml file that holds those settings into the 'application data folder'

        Comment

        Working...