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
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