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("ema il").Value = App.Path & "\Accounts.ini"
WebBrowser.Document.Forms( "MailForm" ).All("pas sword").Va lue = App.Path & "\Accounts.ini"
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(
WebBrowser.Document.Forms(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
Dim AccInfo As UserInfo
AccInfo = UserSettings(App.Path & "\accounts.ini")
Label1.Caption = AccInfo.UserName
Label2.Caption = AccInfo.Password
End Sub
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