Error message that doesn't go away
-
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in system.windows.forms.dll Additional information: Unable to get the window handle for the 'AxWebBrowser' control. Windowless ActiveX controls are not supported.
This happens whenever the application terminates. Sammy "A good friend, is like a good book: the inside is better than the cover..." -
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in system.windows.forms.dll Additional information: Unable to get the window handle for the 'AxWebBrowser' control. Windowless ActiveX controls are not supported.
This happens whenever the application terminates. Sammy "A good friend, is like a good book: the inside is better than the cover..."The only instance I can find of something like this has a bit of a weird solution. Try putting the WebBrowser control in a Panel control. RageInTheMachine9532
-
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in system.windows.forms.dll Additional information: Unable to get the window handle for the 'AxWebBrowser' control. Windowless ActiveX controls are not supported.
This happens whenever the application terminates. Sammy "A good friend, is like a good book: the inside is better than the cover..."In your container, override
Dispose(bool)
(if it isn't already, which VS.NET does automatically when you create a new class from the appropriate templates) and be sure to callAxWebBrowser.Dispose
. This typically helps. The problem is basically a race condition. The window gets destroyed (hence, no window handle) before the control itself is cleaned-up.Microsoft MVP, Visual C# My Articles