FIXING EXISTING STANDARD THREAD CODE TO WORK IN A THREADED METHOD.
I have a webbrowser control hosted in my C# win form. This webbrowser control is being used to navigate some webpages and fill up the textbox found in that page using Document Object Model interface.
i.e. [url removed, login to view]("a")... etc..etc..
And also I am clicking a button using DOM interface. Now, my code is working very fine in the regular standard thread. But I want to get them worked in a thread (Background worker) and here is the problem. my codes are not working at all for background thread. I tried to use [url removed, login to view]() etc... to make the Webbrowser access thread safe but that was not becoming fruitful. Only one code is working in background worker and that is : [url removed, login to view](someURL);
Again, after navigating, I wanted to wait for loading complete, like,
while([url removed, login to view] != [url removed, login to view])
the application falls in an infinite loop. It never comes out from the loop. And when I execute the code for getting the reference for [url removed, login to view], I get error "Object Reference not set to an object"... that means, webbrowser1 is never loaded with the document or something like that.
Now, please let me know if you can get my code working for background worker. =================================================================
Just want to add a note for your convenience......
The amount of code I am looking for to getfixed is very small. Just few lines of code which is actually causing problem. So, IF you are expert about getting a control worked in background worker thread then it will not need a lot of efforts to fix it. So please consider about this point when you place bid.
C# .NET 2.0, Visual Studio 2005