次の方法で共有


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

Synchronous No
Bubbles No
Cancelable No

 

Event handler parameters

  • CX [in, out, ref]

    C++ A pointer to a long integer that receives and specifies the width of the client window.
    VB Long 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.
    VB Long 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.