CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007
    Posts
    68

    Updating buttons via an ini file

    Hi All

    I have an ini file that looks like the following that gets exported from an old system that I dont have an admin function for.

    [BasicSetup]
    Database=c:\MyDatabase.mdb
    ScrollText=This is todays scrolling message

    [Items]
    Item1=AAA 123 Hinge Red
    Item2=ABA 123 Socket Blue
    Item3=AAA 123 Hinge Blue
    Item4=ABC 123 Plug Black
    Item6=ABA 123 Socket White
    Item7=ABA 234 Fuse Black

    This ini file can have hundreds of items.

    On my form I would have 10 Hidden buttons, on load it would read the ini file, a button would become visible based on the unique values on the items of the first part of the code, in this case I would have 3 buttons named

    AAA
    ABA
    ABC

    If button AAA was pushed then it would refresh the buttons based on the second part of the code that corresponds to the first, in the case of AAA it would be one button called 123, so the breakdown of buttons would be based on the code, in the case above there would be a maximum of 4 levels, but there could be more or less depending on what the old system outputs, in case above the buttons would be.

    AAA -- 123 -- Hinge -- Red
    ----------------------Blue

    ABA -- 123 -- Socket -- Blue
    ------------------------White
    ------- 234 -- Fuse -- Black
    ABC -- 123 -- Plug -- Black

    Any help would be appreciated as I am not sure how to start this.

    Cheers

    Dougie

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Updating buttons via an ini file

    So what is it that you need help with?

    Also I have no idea what your little diagram layout is supposed to represent.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Updating buttons via an ini file


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

Featured