I am running a Windows Form UserControl inside IE. I want to control IE
(i.e. to navigate) so I'm trying to get the IWebBrowser2 interface from
inside the WinForm. I can do this in an ATL control by calling
GetClientSite and QueryInterfacing for IServiceProvider then for
IWebBrowser2. I can't seem to figure out how to do this in the WinForm.
Basically, all of the available Parent or Container related properties of my
UserControl are either null or won't cast to any of the ActiveX interfaces I
need. So, I assume I don't have the actually ActiveX object when I
QueryInterface against my UserControl. Please note I don't want to
instantiate a new browser instance but instead drive the instance that
contains my UserControl.
Any advice would be greatly appreciated since I'm completely stuck!