Avatar of rengsons
rengsons
Flag 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
C#

Avatar of undefined
Last Comment
rengsons

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
BourbonKid

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
rengsons

ASKER
ok.Thank you
rengsons

ASKER
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).

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy