Link to home
Start Free TrialLog in
Avatar of rengsons
rengsonsFlag for India

asked on

Access picture box control through multiple threading in C# .net

I have on picture box control in my application. Also added one timer control. In the timer tick event i have call the thread which try to enable or disble the picture box.
    After starting the process ,software throws error like following.

An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll

Additional information: Cross-thread operation not valid: Control 'picPopup' accessed from a thread other than the thread it was created on

Can any one give the exact solution
ASKER CERTIFIED SOLUTION
Avatar of BourbonKid
BourbonKid
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rengsons

ASKER

ok.Thank you
Another one issue i am facing is, inside the thread i am calling aother form's method(Which is used to display one page as popup). But that page is not opened. If i am diriectly calling the page,it is opening. But if i use thread,it won't show. I am trying to debug. The code is eexcuting correctly(try to tell open the page) .But no pop up is display. (No errors also display).