marhk51
asked on
How to Read/Write to a text file in eVB 3.0
I am trying to make my appliction use a "setup.ini" file so it can load users preferences etc...
PLEASE NOTE I AM USING eVB 3.0.
1) How do I create the file (with Default options) if it does not already exist or has been deleted ?
2) How do I read certain values from the file ?
3) How do I change/write certain values to the file ?
The format of the Setup file is just like a standard INI file:
[OPTIONS]
option1=test1
option2=test2
option3=test3
Thanks in advance...
PLEASE NOTE I AM USING eVB 3.0.
1) How do I create the file (with Default options) if it does not already exist or has been deleted ?
2) How do I read certain values from the file ?
3) How do I change/write certain values to the file ?
The format of the Setup file is just like a standard INI file:
[OPTIONS]
option1=test1
option2=test2
option3=test3
Thanks in advance...
https://www.experts-exchange.com/questions/21056168/saving-to-a-config-file-in-vb6.html
The standard way to do this type of thing now is to use the GetSetting and SaveSetting functions to read and write to the registry instead of an ini file
ASKER
That won't work with eVB 3.0 !
EVB 3.0 has a file control........You can use this control to open a text file and read its parameters (Line by Line) and then you can also write back to the file using the same control (I have used File Control for only reading but writing will not be that much difficult).......
Imran Arshad
Imran Arshad
ASKER
Thanks for that, but I need someone to write some code so that I can pick out certain lines from the INI file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.