G
Guest
What I should do to return back the permissin I had in VS2003 , that allowd
me to access public methode of one Class from other Thread.
I have Class A(FORM) which create new thread (new class B), the new class
thread get as parameter reference to his father( CLASS who mad it (classA)),
The new thread need to call methodes from his father like myfathe.methode(),
This worked in VS 2003 but now in VS 2005 Beta throw an exception :
An unhandled exception of type 'System.InvalidOperationException' occurred
in System.Windows.Forms.dll
Additional information: Illegal cross-thread operation: Control
'Green_pictureBox1' accessed from a thread other than the thread it was
created on.
Stack trace where the illegal operation occurred was:
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.SetVisibleCore(Boolean)
at System.Windows.Forms.Control.set_Visible(Boolean)
at Mynamespace.Test_Board_Main_Form.Green_originalimageI_Light(Boolean)
at Mynamespace.ExecuteThread.FirmwareUpdateDll()
me to access public methode of one Class from other Thread.
I have Class A(FORM) which create new thread (new class B), the new class
thread get as parameter reference to his father( CLASS who mad it (classA)),
The new thread need to call methodes from his father like myfathe.methode(),
This worked in VS 2003 but now in VS 2005 Beta throw an exception :
An unhandled exception of type 'System.InvalidOperationException' occurred
in System.Windows.Forms.dll
Additional information: Illegal cross-thread operation: Control
'Green_pictureBox1' accessed from a thread other than the thread it was
created on.
Stack trace where the illegal operation occurred was:
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.SetVisibleCore(Boolean)
at System.Windows.Forms.Control.set_Visible(Boolean)
at Mynamespace.Test_Board_Main_Form.Green_originalimageI_Light(Boolean)
at Mynamespace.ExecuteThread.FirmwareUpdateDll()