Can someone help me please? I need to load the web page while the rest of the code waits for it to load, i tried so many hours but can't seem to figure it out!
Code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'My.Computer.FileSystem.DeleteFile("C:\Users\Simon\Documents\Visual Studio 2010\Projects\#\#\bin\Release\captcha12.jpg")
UseProxy(RichTextBox2.Text)
WebBrowser1.Navigate("http://cc.cc/capt/capt.php?sc=1cve")
Dim both As Bitmap = New Bitmap(570, 147, Imaging.PixelFormat.Format32bppArgb)
' Create a Graphics object that will process the screen shot
Dim gfx As Graphics = Graphics.FromImage(both)
' Copy the screen contents
gfx.CopyFromScreen(0, 0, -80, -240, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy)
' Save the resulting graphics
both.Save("captcha12.jpg", Imaging.ImageFormat.Jpeg)
PictureBox1.Image = Image.FromFile("C:\Users\Simon\Documents\Visual Studio 2010\Projects\#\#\bin\release\captcha12.jpg")
Button4.PerformClick()
'sw.Start()
'Do
'Application.DoEvents()
' Loop Until sw.ElapsedMilliseconds >= 5000
'sw.Stop()
WebBrowser1.Document.GetElementById("adcopy_response").InnerText = RichTextBox3.Text
'My.Computer.FileSystem.DeleteFile("C:\Users\Simon\Documents\Visual Studio 2010\Projects\#\#\bin\Release\captcha12.jpg")
End Sub


![[Image: 86251a37e635a21aea7eb7e014b0d820.gif]](https://i.gyazo.com/86251a37e635a21aea7eb7e014b0d820.gif)