Link to home
Start Free TrialLog in
Avatar of aplelois
aplelois

asked on

info from file

hello,
I have this in Accounts.ini

[UserNames]
Text_Email=name@mail.com
Text_Password=temp123

and this in my VB6 but how do I make it so it reads email and password?
WebBrowser.Document.Forms("MailForm").All("email").Value = App.Path & "\Accounts.ini"
WebBrowser.Document.Forms("MailForm").All("password").Value = App.Path & "\Accounts.ini"
Avatar of Sethi
Sethi
Flag of India image

This is an INI format. The following links will help you:

Use Registry Instead of INI
Registry is a better way to use instead of INI. Here are two links that will be of help:
http://www.vbaccelerator.com/home/VB/Code/Libraries/Registry_and_Ini_Files/Easy_Ini_File_Access/article.asp
http://www.thescarms.com/VBasic/registry.asp

Advantage Of Registry Over INI
http://www.pcsupportadvisor.com/windows_registry_tutorial_page1.htm

Complete Registry Control
http://www.vbaccelerator.com/home/VB/Code/Libraries/Registry_and_Ini_Files/Complete_Registry_Control/article.asp
ASKER CERTIFIED SOLUTION
Avatar of vinnyd79
vinnyd79

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

ASKER

thanks for your code.. instead of MsgBox how can I display it as label ?
Private Sub Command1_Click()
Dim AccInfo As UserInfo
AccInfo = UserSettings(App.Path & "\accounts.ini")

Label1.Caption = AccInfo.UserName
Label2.Caption = AccInfo.Password

End Sub