Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21238

[RESOLVED] INI File

$
0
0
I'm working with an INI file that I use to save and read info for my program.

I know how to save and read data for the first element of an array of elements but do not know how to do this for the rest of the elements in the array.

Example:

My program loads UC's where each UC contains a picture, label, combobox, and a checkbox. Each UC will have different values for these items.

In my INI file I have a header titled "Index" and the other fields like this:

[Index]
CellIndex=the index value for the UC
PicturePath=the path to the bmp file
LabelCaption=the caption of the label
ComboBoxText=the text you see in the Combobox Text field
ComboBoxItem=text data that you add using AddItem
CheckBoxValue=a value of 0 or 1

It's easy to store and read from this INI for the first UC that I load because the data is stored in the fields for Index 1. But how do I save and read for UC's 2 - nn?

I'm thinking to have many of these 'sections' with each one having the index of a UC so if I read "Index" and the value of CellIndex is equal to the current index then I know I have the correct section but if it is not equal then I read the next section but this is what I don't know how to do (create it and read it) if this is a good approach to my problem.

Viewing all articles
Browse latest Browse all 21238

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>