Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

webBrowser unload

Status
Not open for further replies.

bledileka

Programmer
Nov 15, 2006
16
hi all
im tryin to make and identification form that makes the verification in a website with cookies. Wehen i press login it makes the verification, if the username and password are right it shows a welcome message else it shows the wrong password error. But, in the first case, when the application is open it still give me the welcome message. Is there anyway to unload the webBrowser after it makes the verification ?
Here is the source code :

Private Sub Form_Load()
faqe.Navigate "login.php"
End Sub

Private Sub faqe_DocumentComplete(ByVal pDisp As Object, url As Variant)
kot1 = faqe.LocationURL
Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
user.Enabled = True
pass.Enabled = True

If kot1 <> "login.php" Then
MsgBox "Welcome !"
Unload Me
frmMain.Show
Timer1.Enabled = False

Else
If kot1 = "login.php" Then
MsgBox "Wrong pass !"
user = ""
pass = ""
Timer1.Enabled = False
End If
End If
End Sub

Private Sub login_Click()
faqe.Document.All.Item("username").Value = user
faqe.Document.All.Item("password").Value = pass
faqe.Document.All.Item("log_in").Click
End Sub
 
Maybe you could put the webbrowser on a separate form and close the form when you have finished with it and set the webbrowser and the form = nothing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top