This method of the IWebBrowser2 interface retrieves the handle to the Microsoft® Internet Explorer main window.
public int getHWND();