Hello,
I have the following problem:
The downloadcomplete event is not loaded in the sub.
Unless I insert a Messagebox.Show as a test. Then the downloadcomplete event is triggered. I do not understand the problem.
Button calls thread with:
Dim ThreadX As New Thread(AddressOf MTX)
ThreadX.SetApartmentState(ApartmentState.STA)
ThreadX.Start()
The web browser element is created in a new thread: (Works with Messagebox "MessageBox.Show("OK1")". Without dont work)
Sub MTX()
Dim WB1 As New WebBrowser
WB1.ScriptErrorsSuppressed = True
WB1.Navigate(New Uri("https://google.at"))
Reload:
MessageBox.Show("OK1")
If WB1.ReadyState = WebBrowserReadyState.Complete Then
MessageBox.Show("LOADED")
Else
Thread.Sleep(500)
GoTo Reload
End If
End Sub
I have also tried it with a Do While Loop, without success
Any ideas? i Search since 2 days over 10 hours
What I have tried:
I have also tried it with a Do While Loop, without success
Any ideas? i Search since 2 days over 10 hours