An unhandled exception of type 'System.Threading.ThreadStateException' occurred in System.Windows.Forms.dll webbrowser control
I am trying to capture the frames of a video and then processing them in a separate thread. After processing the frame I need to call a form that has a webBrowser control in for displaying the web page as an over lay on first winform.
Is there any way out that I can call this form inside the class I am using for processing the frames. If I do i keep getting haunted by the above specified exception.
I have done research on SO and other forums but could not get any solution for this issue. Here is my code:
class FrameProcessor
{
//This line results in the above stated Exception.
webForm frm=new webForm ();
frm.Show();
}
Is there any work around for this? Any suggestions would be really appreciated.