Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- thread = New System.Threading.Thread(AddressOf test)
- thread.Start()
- End Sub
- Delegate Sub varBR(ByVal wb As WebBrowser)
- Private Sub SetText(ByVal wb As WebBrowser)
- ' InvokeRequired required compares the thread ID of the
- ' calling thread to the thread ID of the creating thread.
- ' If these threads are different, it returns true.
- If Me.WebBrowser2.InvokeRequired Then
- Dim d As New varBR(AddressOf SetText)
- Me.Invoke(d, New Object() {[wb]})
- Else
- 'Me.textBox1.Text = [text]
- webbrowser2.ScriptErrorsSuppressed = True
- webbrowser2.Navigate("gmail.com")
- Dim Username, Password As String
- Username = "abcd"
- Password = "efgh"
- webbrowser2.Document.All("Email").SetAttribute("value", Username)
- webbrowser2.Document.All("next").InvokeMember("click")
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement