Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ClientToHostWindow event

Fires to request that the client window size is converted to the host window size.

Syntax

HTML Attribute <element ClientToHostWindow = "handler(event)">
attachEvent Method object.attachEvent("ClientToHostWindow", handler)

Event information

SynchronousNo
BubblesNo
CancelableNo

Event handler parameters

CX [in, out, ref]
C++A pointer to a long integer that receives and specifies the width of the client window.
VBLong integer that receives the width of the client window and can be set by the host application.
CY [in, out, ref]
C++A pointer to a long integer that receives and specifies the height of the client window.
VBLong integer that receives the height of the client window and can be set by the host application.

Remarks

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.

See also

WebBrowser

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.