
HRESULT moveBy(
long x,
long y
);
Currently not implemented, and has no effect when called.
HRESULT moveTo(
long x,
long y
);
Currently not implemented, and has no effect when called.
See also scrollBy
HRESULT navigate(
BSTR url
);
Causes the browser to browse to the location specified by the URL.
This method performs the same action as the IHTMLLocation::put_href method.
HRESULT open(
BSTR url,
BSTR name,
BSTR features,
VARIANT_BOOL replace,
IHTMLWindow2 **pomWindowResult
);
Opens a new Web browser window.
| Attribute | Values | Description |
| fullscreen | yes/no/1/0 | Browser displays in full-screen (true) or normal window (false) mode. |
| toolbar | yes/no/1/0 | Browser toolbar (Back and Forward buttons, and so on) |
| location | yes/no/1/0 | Input field for entering URLs directly into the browser. |
| directories | yes/no/1/0 | Directory buttons. |
| status | yes/no/1/0 | Status line at bottom of window. |
| menubar | yes/no/1/0 | Menu bar. |
| scrollbars | yes/no/1/0 | Horizontal and vertical scroll bars are enabled. |
| resizable | yes/no/1/0 | Do resize handles appear at the edge. |
| width | pixel | Width of window; defaults to pixels. |
| height | pixel | Height of window; defaults to pixels. |
| top | pixel | Top position, in pixels, in relation to the desktop. |
| left | pixel | Left position, in pixels, in relation to the desktop. |
HRESULT prompt(
BSTR message,
BSTR defstr,
VARIANT *textdata
);
Displays a Prompt dialog box with a message, an input field, and OK and Cancel buttons.
The title bar of the prompt dialog box cannot be changed.
HRESULT put_defaultStatus(
BSTR v
);
Sets the default message displayed in the status bar at the bottom of the window.
Do not confuse the defaultStatus property with the status property set by the put_status method. The status property reflects a priority or transient message in the status bar, such as the message that appears when an onmouseover event occurs over an anchor.
See also get_defaultStatus
HRESULT put_name(
BSTR v
);
Sets the name of the window.
The name property on the window comes from the FRAME definition. There is no other way to persist a window name in HTML.
See also get_name
HRESULT put_offscreenBuffering(
VARIANT v
);
Specifies whether to use an offscreen buffer.
See also get_offscreenBuffering
HRESULT put_onbeforeunload(
VARIANT v
);
Sets the inline script associated with the onbeforeunload event before a window element is unloaded. This event is fired before the onunload event. It provides an opportunity to warn the user if the window is currently in an unsaved state and the information will be lost.
For more information on inline script, see Attaching an Event Handler in the Event Model documentation.
The handler for this event should return NULL if doing the unload is safe, or a text string to prompt the user to decide to cancel or continue with the unload operation. Only the user's response to the warning can stop the new navigation causing the unload; the event handler itself cannot unilaterally block the operation. If the handler returns a non-NULL string, a modal dialog box appears that displays the explanatory string. The dialog box shows three buttons with the message for user action:
In the case of frames, the full sequence of onbeforeunload events is fired on each frame in the same order, depth-first, that onunload events are about to be fired. A dialog box is presented for each event handler that returns a non-NULL string. The first Cancel response stops the potential navigation, in which case no unload occurs. If there is no Cancel response, the unload proceeds and onunload events fire.
See also get_onbeforeunload
HRESULT put_onblur(
VARIANT v
);
Sets the inline script associated with the onblur event when the window element loses the focus.
For more information on inline script, see Attaching an Event Handler in the Event Model documentation.
See also get_onblur
HRESULT put_onerror(
VARIANT v
);
Sets the inline script associated with the onerror event on the window element.
For more information on inline scripts, see Attaching an Event Handler in the Event Model documentation.
See also get_onerror
HRESULT put_onfocus(
VARIANT v
);
Sets the inline script associated with the onfocus event on the window element. This script is executed when the window receives focus.
For more information on inline scripts, see Attaching an Event Handler in the Event Model documentation.
See also get_onfocus
HRESULT put_onhelp(
VARIANT v
);
Sets the inline script associated with the onhelp event on the window element. This script is executed when the user presses the F1 key or clicks the help button in the browser.
For more information on inline scripts, see Attaching an Event Handler in the Event Model documentation.
See also get_onhelp
HRESULT put_onload(
VARIANT v
);
Sets the inline script associated with the onload event on the window element. This script is executed immediately after the browser loads the given object.
For more information on inline scripts, see Attaching an Event Handler in the Event Model documentation.
See also get_onload
HRESULT put_onresize(
VARIANT v
);
Specifies code to execute whenever the window is resized.
See also get_onresize
HRESULT put_onscroll(
VARIANT v
);
Specifies code to execute when the scroll box is repositioned. The default action of this event is to scroll.
See also get_onscroll
HRESULT put_onunload(
VARIANT v
);
Specifies code to execute immediately before the page is unloaded.
See also get_onunload
HRESULT put_opener(
VARIANT v
);
Sets a reference to the window that created the current window.
See also get_opener
HRESULT put_status(
BSTR v
);
Sets the message displayed in the status bar at the bottom of the window.
Do not confuse the status property with the defaultStatus property set by the put_defaultStatus method. The status property reflects a priority or transient message in the status bar, such as the message that appears when an onmouseover event occurs over an anchor.
See also get_status
HRESULT resizeBy(
long x,
long y
);
Currently not implemented, and has no effect when called.
See also resizeTo
HRESULT resizeTo(
long x,
long y
);
Currently not implemented, and has no effect when called.
See also resizeBy
HRESULT scroll(
long x,
long y
);
Scrolls the window to the specified x and y offset relative to the entire document.
HRESULT scrollBy(
long x,
long y
);
Scrolls the document horizontally by the x value provided, and scrolls the document vertically by the y value provided.
See also scrollTo
HRESULT scrollTo(
long x,
long y
);
Given the area specified as (X,Y) in document coordinates, scrolls the document to that position.
HRESULT setInterval(
BSTR expression,
long msec,
VARIANT *language,
long *timerID
);
Calls a function repeatedly, or evaluates an expression after a specified number of milliseconds has elapsed.
See also clearInterval
HRESULT setTimeout(
BSTR expression,
long msec,
VARIANT *language,
long *timerID
);
Evaluates an expression after a specified number of milliseconds has elapsed.
See also clearTimeout
HRESULT showHelp(
BSTR helpURL,
VARIANT helpArg,
BSTR features
);
Displays a help file.
HRESULT showModalDialog(
BSTR dialog,
VARIANT *varArgIn,
VARIANT *varOptions,
VARIANT *varArgOut
);
Displays an HTML dialog box.
| Attribute | Values | IE3/IE4 | Description |
| dialogWidth | pixel | IE3/IE4 | Sets the width of the window, in pixels. |
| dialogHeight | pixel | IE3/IE4 | Sets the height of the window, in pixels. |
| dialogTop | pixel | IE3/IE4 | Sets the top position of the window, in pixels, relative to the desktop. |
| dialogLeft | pixel | IE3/IE4 | Sets the left position of the window, in pixels, relative to the desktop. |
| center | yes/no/1/0 | Not yet implemented in IE4. | Centered relative to the desktop. |
| font | font-family | Not yet implemented in IE4. | |
| font-size | Not yet implemented in IE4. | ||
| font-weight | Not yet implemented in IE4. | ||
| font-style | Not yet implemented in IE4. | Describes the font and font attributes. The syntax should look like CSS. For example, font:3;font-size:4. To define multiple font values, use multiple font attributes. | |
| edgeStyle | raised/sunken | Not yet implemented in IE4. | Sets the style of the window border. |
| borderSize | thick/thin | Not yet implemented in IE4. | Sets the thickness of the window border. |
| help | yes/no/1/0 | Not yet implemented in IE4. | Determines whether the help icon appears in the title bar |
| min | yes/no/1/0 | Not yet implemented in IE4. | Determines whether the minimize button appears in the title bar. |
| max | yes/no/1/0 | Not yet implemented in IE4. | Determines whether the maximize button appears in the title bar. |
| system menu | yes/no/1/0 | Not yet implemented in IE4. | Determines whether the system menu is available from the border icon. |
| sync | yes/no/1/0 | Not yet implemented in IE4. |
HRESULT toString(
BSTR *String
);
Retrieves a string representation of the window object.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.