I have a windows forms based .net application. I also have a webbrowser component on that form.
What I want is to have browser.Document.InvokeScript(...) execute in another thread and not on the main thread so my main form will not appear to freeze while the script runs.
Can this be done? How?
So far I have tried these:
1. Use delegate with ThreadStart and do this.invoke(method_calling_invoke_script) = works but executes in main thread thus freezing my main form
2. Use BackgroundWorker and call browser.Document.InvokeScript(...) in the worker.DoWork handler = invokescript does not work but does not freeze my main form
Any more ideas?