Enable a MenuItem from a different Thread

T

Trevor

I am trying to figure out how to enable a MenuItem from a thread. I use
Control.Invoke to update the text of a label and textbox from the thread.
However, MenuItem does not inherit from Control and does not seem to have an
Invoke/InvokeRequired method. How can I enable a MenuItem from a different
thread?
 
C

Chris Tacke, eMVP

Use Invoke/InvokeRequired on another control that was created in the UI
Thread context. The Form the menu is on is a good candidate.

--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
T

Trevor

That did the trick. Thanks for the tip.

Chris Tacke said:
Use Invoke/InvokeRequired on another control that was created in the UI
Thread context. The Form the menu is on is a good candidate.

--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top