Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

If I had 3 webbrowsers on a form and the following code.

 

Would all three webbrowsers do their navigation to the 3 pages at the same time, and present the results at roughly the same time? As if for example they were on seperate threads?

 

Thanks

 

Dim Browser1State as Int16 = 1 
Dim Browser2State as Int16 = 1 
Dim Browser3State as Int16 = 1 

Sub Form_Load 
WebBrowser1.Navigate("www.site1.com/login.aspx")
WebBrowser2.Navigate("www.site2.com/login.aspx") 
WebBrowser3.Naviagte("www.site3.com/login.aspx") 
End Sub 

Sub WebBrowser1.DocumentCompleted 
Select Case Browser1State 

Case 1 
Browser1State = 2
'Enter the login details and click the submit button

Case 2 
Browser1State = 3
'Enter parameters on page 2 and click submit

Case 3 
'Scrape some information off the results page 
End Sub 

Sub WebBrowser2.DocumentCompleted 
Select Case Browser2State 

Case 1 
Browser2State = 2
'Enter the login details and click the submit button

Case 2 Browser2State = 3
'Enter parameters on page 2 and click submit

Case 3 
'Scrape some information off the results page
End Sub

Sub WebBrowser3.DocumentCompleted
Select Case Browser3State

Case 1
Browser3State = 2
'Enter the login details and click the submit button

Case 2
Browser3State = 3
'Enter parameters on page 2 and click submit

Case 3 
'Scrape some information off the results page
End Sub

 

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...