Threading
-
Ok, I have the following problem. A function is called asyncronously in the program, and someone told me that is done in a new Thread. Inside the function I want to open a new form but it crashes when I try. So i decided I have to open the form in the main thread. Can anyone please tell me how can I do just that? Thank you. :)
-
Ok, I have the following problem. A function is called asyncronously in the program, and someone told me that is done in a new Thread. Inside the function I want to open a new form but it crashes when I try. So i decided I have to open the form in the main thread. Can anyone please tell me how can I do just that? Thank you. :)
Use Form.Invoke to call a control method outside the thread where it was created. You have to know how to work with delegates to do that. -------- "I say no to drugs, but they don't listen." - Marilyn Manson
-
Use Form.Invoke to call a control method outside the thread where it was created. You have to know how to work with delegates to do that. -------- "I say no to drugs, but they don't listen." - Marilyn Manson