Fires to request that the client window size is converted to the host window size.
Private Sub object_ClientToHostWindow( _ ByRef CX As Long, _ ByRef CY As Long)
Object expression that resolves to the WebBrowser object.
Long integer that receives the width of the client window and can be set by the host application.
Long integer that receives the height of the client window and can be set by the host application.
No return value.
The ClientToHostWindow event enables the host application to adjust the size of the WebBrowser control window that allows for user interface items such as a toolbar, menu bar, or address bar.
This event is fired when a new window is opened through scripting, using the open method.
The following example indicates how the ClientToHostWindow event can be handled.
Private Sub WebBrowser1_ClientToHostWindow(CX As Long, CY As Long) If (bToolbarVisible) Then CY = CY + iToolbarHeight End If If (bStatusbarVisible) Then CY = CY + iStatusbarHeight End If End Sub
This event is available only to an application that is hosting the WebBrowser control installed by Microsoft Internet Explorer 5.5 and later.