I am getting a VB program to read an INI file and display the text in a text box array, I am doing this using the following code.
The problem I am facing is that when I display the fields I want, the display does not show speech marks, numbers (unless they were in speech marks in the ini) and also forgets the last letter/number in the INI, e.g.;
would display as;
hello 12
in the right text box
Any help please ^^
Code:
Private Sub cmdRead_Click()
'Defining location of INI
File = App.Path & "\LOM2.ini"
OFLen = FileLen(File)
'Read INI and store in String Array
Str(0) = ReadIni(File, "ledu", "ledu")
Str(1) = ReadIni(File, "db", "db_svr")
Str(2) = ReadIni(File, "game", "game_gate")
Str(3) = ReadIni(File, "login1", "login_gate")
Str(4) = ReadIni(File, "login2", "login_svr")
Str(5) = ReadIni(File, "select", "sel_gate")
Str(6) = ReadIni(File, "m2", "m2_svr")
'Take Array values and place in Text Value Array to display
For i = 0 To 6
txtPaths(i) = Str(i)
Next i
End Sub
The problem I am facing is that when I display the fields I want, the display does not show speech marks, numbers (unless they were in speech marks in the ini) and also forgets the last letter/number in the INI, e.g.;
Code:
[ledu]
ledu="hello 123"
would display as;
hello 12
in the right text box
Any help please ^^
Last edited: