Annoying message from time to time on my .Net application start appears just after splash screen disappears:
System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
I don’t know how to fix this type of exceptions and why it appears?
Any help will be appreciated.!
This problem usually happens if you add code to the constructor of a form/control, since at that time it isn’t linked to a windows control handle. If you have added extra code here, try moving it to
OnLoadedor similar.