Link to home
Start Free TrialLog in
Avatar of marhk51
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...

 
Avatar of JR2003
JR2003

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
Avatar of marhk51

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
Avatar of marhk51

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
Avatar of imarshad
imarshad
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial