VB6 Saving/Loading .TXT Files

Joined
Feb 7, 2008
Messages
1
Reaction score
0
I don't know how to save/load values to a text file. I would also like to find out how will I find specific values in the text file because I will use it as a config file.

Its like this

sample.txt:
ipadd=127.0.0.1
resolution=1024x768
and so on

The program will load the txt file and get the configurations and set it.




Thanks
 
Last edited:
Gives the variable "SettingIni" a value
Code:
SettingIni = Replace(App.Path & "\...\settings.ini", "\\", "\")
Then
Code:
'If the value in the variable SettingIni does not exist
If FileExists(SettingIni) = False Then

'Messagebox that says it could'nt find Settings.ini
MsgBox "Coulden find Setting.ini please go to our website to download it", vbCritical, "Virual Emulator"
End
End If

Then its just basically reading/writing.
Code:
ReadINI "...", SettingIni
 
Private Sub cmdWrite_Click()
WriteINI(App.Path + "/****/****/settings.ini")
End Sub

I think =]
 
Back