Microsoft
Software
Hardware
Network
Question : Invoke Webbrowser from a seperate thread vb.net
Hi all,
I've spent a couple hours trying to figure out threading and how to access form controls from a separate thread but I'm still confused. Any help would be appreciated. Here is some simplified code to give you an example of what I'm trying to do:
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim newThread As Thread = New Thread(AddressOf Timer2_Work)
newThread.Start()
End Sub
Private Sub Timer2_Work()
Dim val As String = "somevalue"
Dim element As String = "TheNameOfSomeWebPageEleme
nt"
WebBrowser1.Document.All(e
lement).In
nerText = val
End Sub
This code gives me the error "Specified cast is not valid." and I have to assume the error is threading related, and the webbrowser control has to be called from the thread its on.
I've tried several things, and tried replicating some examples I've found, but never actually got it working. If you can provide a example of how I could accomplish this, or direct me to a "vb.net threading for complete idiots" page, I would be very grateful.
Answer : Invoke Webbrowser from a seperate thread vb.net
Is the router plugged into the server and nowhere else? If that's the case, then how else will it get bypassed?
This may sound facecious, but its not. If you can trace the cabling through, you have your answer.
Snibborg
Random Solutions
Is there a DSMOD query to change the domain part (only) of an email address in AD?
Auto login Windows 7
Folders from Windows Updates are created in USB Discs
OWA no longer working after Exchange 2010 rollup 4
Restoring Windows Server 2008 System state backup on different machine
VMWare ESXI training material?
Save Icon is is disabled in my PDF Adobe Reader 9.0
Exchange 2010 CAS and certificates
ASP.NET Membership minRequiredNonalphanumeric
Characters
Problem
Error running DC Promo on Windows 2008 R2