I have a Form that throws this when I close it:
"Invoke or BeginInvoke cannot be called on a control until the window handle has been created."
This seems to be the offending code, running in a child thread:
this.Invoke(new someDelegate(someMethod));
I figured that if I could capture the user clicking on the X in the window chrome I could stop this thread before it tries calling the (already closed) Main thread. I'm not finding anything useful by googling, which keywords should I be searching for? What am I doing wrong? Should I just wrap it in a try{}?
Thanks!