Results 1 to 3 of 3

Thread: Ini for the fisrst time

  1. #1

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Post

    Hello
    I'm starting to use an ini-file for my project after been reading alot of Q&A's here. My simple Q is this
    I uses this code to save to my ini but I wan't an empty row in before every Heading to make the ini-file easier to interpret.
    But when I use this code, my ini-fiel only contains this: [] =
    Code:
    For intX = 0 To 5
        strHeading = txtHeading.Text & intX
        For intY = 0 To 10
            lngResult = WritePrivateProfileString(strHeading, txtKey.Text & intY, txtValue.Text, strFileName)
        Next intY
            
            'I want an empty row        lngTomRad = WritePrivateProfileString("", "", "", strFileName)
    Next intX
    How can I insert an empty row before every Heading??
    Thanks

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    Why bother?
    The APIs are written to make using INI files as easy as it can possibly be.
    You're not supposed to be reading the INI File yourself, so Layout/Format shouldn't be a concern, so long as the INI API's get you the Info you need.

    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    adyoung@win.bright.net

  3. #3

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Post

    I bother because I need to check the inifile alot when debugging my app, and it's kinda frustrating not to be able to separate the Headings form the previous key.
    So once again how can I accomplich this?(se original Q)
    Thanks

    ------------------
    On Error Goto Bed :0)
    anders@zsystemdesign.se



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