PDA

Click to See Complete Forum and Search --> : Ini for the fisrst time


onerrorgoto
Dec 15th, 1999, 06:28 PM
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: [] =

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

Aaron Young
Dec 16th, 1999, 01:03 AM
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

onerrorgoto
Dec 16th, 1999, 09:31 PM
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