Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,
I just want to access the checkbox Checked event from another winform in VB.net.
as i know that we are not supposed to do because of some threading issue . UI modification we should not do ..

But what should be feasible solution for this kind of requirment.

Thanks
Posted

1 solution

You can't access it when you run it in a new thread or BackgroundWorker without doing a Invoke. If your just wanting to update it from another form in the same thread, use
Form1.CheckboxName.Checked = True
(or False).

Your question isn't exactly clear...
 
Share this answer
 
Comments
lalit.mca2006 20-Feb-15 5:12am    
Thanks chrisf
Actually i have to change the property of any control(suppose checkbox) in "Form1" . But right now i have moved to form2 so that i will have to write the code in "form2".
pdoxtader 21-Feb-15 9:29am    
Yeah... I don't see the problem. Chris's solution still applies. If you're still having trouble, you're going to need to be a little more clear.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900