I'm using VB.NET and I've got a button on a form with a webbrowser control on it.
On Form load it navigates to a site and logs in and goes to a specific page after login.
My goal is to click the button and then when the page finishes loading run some code to fill in the form.
I've already used "Private Sub AxWebBrowser1_DocumentComp
lete()" to auto negotiate past some other url's so the way I have it set up I cant really use it to tell when this page is done loading, so I have to find another way.
I've tried this but my "While" readystate part doesnt seem to work like it should.
How could I accomplish this?
Code:Private Sub btnFillCreditInquiry_Click
(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFillCreditInquiry.Click
While AxWebBrowser1.ReadyState = SHDocVw.tagREADYSTATE.READ
If AxWebBrowser1.ReadyState = SHDocVw.tagREADYSTATE.READ
lue = "FirstName"
The following is my DOCUMENTCOMPLETE code that makes it hard to use for the previous button click code.
Private Sub AxWebBrowser1_DocumentComp
sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvent
vent) Handles AxWebBrowser1.DocumentComp
Static page As Integer = 1
Select Case page
.value = myLogin
.value = myPassword
page = page + 1 ' add one to the counter so it = 2
page = page + 1 ' add one to the counter so it = 3