PavelGur
Programmer
- Sep 21, 2001
- 75
I have the following code working very well in VB6. I have some trouble to find an equivalent for VB.NET. I looked into WebClient but it does not seem to do the same work.
Does anybody know what it is?
Thanks, Pavel.
Sub IntTest()
Dim oIE As New SHDocVw.InternetExplorer
Dim sURL, sBuffer As String
sURL = "
'open a new, visible IE window
Set oIE = New SHDocVw.InternetExplorer
oIE.Visible = True
'go to desired page - Yahoo in this case
oIE.Navigate sURL
'wait for page to finish loading
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
oIE.Document.all("tbxUserName").Value = "MyID"
oIE.Document.all("tbxPWD").Value = "MyPSWD"
oIE.Document.all("btnLogin").Click
'oIE.Document.Forms(0).submit
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
sBuffer = oIE.Document.Body.innertext
End Sub
Does anybody know what it is?
Thanks, Pavel.
Sub IntTest()
Dim oIE As New SHDocVw.InternetExplorer
Dim sURL, sBuffer As String
sURL = "
'open a new, visible IE window
Set oIE = New SHDocVw.InternetExplorer
oIE.Visible = True
'go to desired page - Yahoo in this case
oIE.Navigate sURL
'wait for page to finish loading
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
oIE.Document.all("tbxUserName").Value = "MyID"
oIE.Document.all("tbxPWD").Value = "MyPSWD"
oIE.Document.all("btnLogin").Click
'oIE.Document.Forms(0).submit
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
sBuffer = oIE.Document.Body.innertext
End Sub