Hi all,
I am New with VB6.0 and i am Creating a form where u put your user id and password which is auto transfer when you click on command button. i want to login on one web site which is having a web pages in xhtml now i am puting the code on command button which is transfer my userid text in to web site but when i give sendkeys command it is not working i want to sendkeys Tab after transfer a userid text in to user id text box on site. i want to do this beacuse after typing a userid text if i give tab button it is shows one image capture window which is having a some alphanumeric which i have to type in to another text box on site and then i have take login. below mention is my code with i am success to transfer userid text to web site but it is not appear image capture windows. so please help me how can i do this...........................................................Thanks for reading my problem and in advance for giving solutions.
Private Sub Command1_Click()
If WebBrowser1.LocationURL <> "https://www.tdscpc.gov.in/app/login.xhtml" Then
WebBrowser1.Navigate2 "https://www.tdscpc.gov.in/app/login.xhtml"
End If
If Me.WindowState <> vbMinimized Then
WebBrowser1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight - 450 'Make adjustment for command button
End If
End Sub
Public Function EnterToTab(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Function
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If URL = "https://www.tdscpc.gov.in/app/login.xhtml" Then
WebBrowser1.Document.All("hiduserId").Value = txtUser.Text
WebBrowser1.Document.All("userId").Value = txtUser.Text
'EnterToTab
'SendKeys = ("tab")
WebBrowser1.Document.All("psw").Value = txtPW.Text
End If
End Sub
I am New with VB6.0 and i am Creating a form where u put your user id and password which is auto transfer when you click on command button. i want to login on one web site which is having a web pages in xhtml now i am puting the code on command button which is transfer my userid text in to web site but when i give sendkeys command it is not working i want to sendkeys Tab after transfer a userid text in to user id text box on site. i want to do this beacuse after typing a userid text if i give tab button it is shows one image capture window which is having a some alphanumeric which i have to type in to another text box on site and then i have take login. below mention is my code with i am success to transfer userid text to web site but it is not appear image capture windows. so please help me how can i do this...........................................................Thanks for reading my problem and in advance for giving solutions.
Private Sub Command1_Click()
If WebBrowser1.LocationURL <> "https://www.tdscpc.gov.in/app/login.xhtml" Then
WebBrowser1.Navigate2 "https://www.tdscpc.gov.in/app/login.xhtml"
End If
If Me.WindowState <> vbMinimized Then
WebBrowser1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight - 450 'Make adjustment for command button
End If
End Sub
Public Function EnterToTab(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Function
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If URL = "https://www.tdscpc.gov.in/app/login.xhtml" Then
WebBrowser1.Document.All("hiduserId").Value = txtUser.Text
WebBrowser1.Document.All("userId").Value = txtUser.Text
'EnterToTab
'SendKeys = ("tab")
WebBrowser1.Document.All("psw").Value = txtPW.Text
End If
End Sub