I am writing something in C# for Multithreading, basically need to know how i can close a Windows Form which is in another Thread, or update the label in that box showing a status also.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 24, 2012, 11:53 AM
This sort of pattern can be used - I'm assuming that the other thread is still executing a method within the form you want to close:
You can, of course, replace this.Close() with any other code involving controls.