After upgrading to the latest version of WinForms (16.1.20161.2033) our application is getting a dispose exception "Invoke or BeginInvoke cannot be called on a control until the window handle has been created." I have only been able to recreate this issue when the control is inherited from a base control. The controls also must have a value in them to get the exception. A workaround for this issue was to dispose of the controls in form 2's closing event which I have added to the sample project but are commented out.
This was not an issue in version 16.1.20161.1000 .
I have attached a sample project. To recreate the issue just click the button on the first form and then simply close the second form.
Hi Michael,
This is a known bug and it will be fixed in the next service release. If you need a fix immediately, I might be able to get you access to an untested build.
I don't need a fix right now. Thanks.