I get a System.InvalidOperationException error when i close my app before the search is done. When i close on Form1_FormClosing i tell all my threads to abort. In one thread it has finalize which calls a delegate function which tells one of the controls in the form to change its text. When that happens I get the exception above along with "Additional information: Invoke or BeginInvoke cannot be called on a control until the window handle has been created."
What can i do to correct this? i could add a isClosing flag and check it before updating the text but that feels like a hack and masking the problem. How do i correctly solve this?