The following properties, methods, and events appear on the IWebBrowser2
interface when hosting the WebBrowser control but are not applicable.
Setting these properties and calling these methods results in inconsistent results.
Similarly, the events listed are not raised.
Properties That Are Not Applicable
- AddressBar
- FullScreen
- MenuBar
- Resizble
- StatusBar
- StatusText
- TheaterMode
- ToolBar
Methods That Are Not Applicable
- ClientToWindow
- ShowBrowserBar
- GetProperty
- PutProperty
- Quit
Events That Are Not Applicable
- OnQuit
- OnFullScreen
- OnMenuBar
- OnTheaterMode
- OnStatusBar
- OnToolBar
- PropertyChange
The reason that these are not applicable is that they are designed to be
used only when you are automating Internet Explorer. When your application
is hosting the WebBrowser control, the above do not apply. But since the
WebBrowser control and Automation share the same interface, IWebBrowser2,
these properties appear for both.
For example, consider the Toolbar property, which applies only when
Internet Explorer is running as a separate window and the toolbar is
displayed. When automating Internet Explorer, you can use this property to
display or hide the toolbar. There is no toolbar with the WebBrowser
control. Your application, which is hosting the WebBrowser control, is
responsible for creating its own toolbar. Therefore, the Toolbar property
is ignored by the WebBrowser control.
The same is true for the FullScreen property. The WebBrowser control cannot
appear in FullScreen mode. You can size the WebBrowser control to occupy
the entire screen yourself, but you cannot use the FullScreen property.
The Quit method also does not apply to the WebBrowser control. You need to
provide this functionality in your own application.
All of the above properties, methods, and events are available when you are
automating Internet Explorer. Automation means that there is a separate
instance of the Internet Explorer window open which is being controlled by
your application. The WebBrowser control is actually hosted within a window
of your own application.