Method description
GoBack is equivalent to IE's "back" button, so that you can return
GoForward is equivalent to IE's "Forward" button, which enables you to move forward an item in the Current History List
GoHome is equivalent to the "Homepage" button of IE and connects to the user's default homepage.
Gosearch' is equivalent to IE's "Search" button and connects to the user's default search page
Navigate' connect to the specified URL
Refresh 'refresh the current page
Refresh2 is the same as above, but the refresh level can be specified. The value of the specified RefreshConstants enumeration table is defined in ExDisp. h. Different values can be specified as follows:
REFRESH_NORMAL: Do not send HTTP pragma: no-cache hair to the server
Refresh_ifexpired' simple refresh only after the webpage expires
REFRESH_CONTINUE 'is for internal use only. Do not use in MSDN! Do not use
REFRESH_COMPLETELY 'sends requests containing the pragma: no-cache header to the server
Pause () is equivalent to the "stop" button of IE to stop loading of the current page and its content.
Attribute description
Application 'If this object is valid, return the Automatic Object (IDispatch) implemented by the Application in charge of the WebBrowser control ).
If the automation object in the Host object is invalid, this program returns the Automation Object of the WebBrowser control.
Parent returns the Parent Automation Object of the WebBrowser control, usually a container, such as a host or IE window.
Container returns the automated object of the WebBrowser control Container. This value is usually the same as the value returned by the Parent property.
Document is the automation object returned for the active document. If HTML is currently being displayed in webbrowser
The document attribute provides access to the DHTML Object Model.
Toplevelcontainer returns a Boolean value indicating whether IE is the top-level container of the webbrowser control. True is returned.
Type returns the type of the object loaded by the webbrowser control. For example, if the file "cmd.doc" is returned
Back to Microsoft Word Document
Left returns or sets the distance between the left side of the webbrowser control window and the left side of the container window.
Top return or set the distance between the left side of the webbrowser control window and the top side of the container window
Width: returns or sets the width of the webbrowser window, in pixels.
Height: returns or sets the height of the webbrowser window, in pixels.
Locationname returns a string containing the name of the resource currently displayed in webbrowser. If the resource is a webpage, It is the webpage title; if it is a file or folder, It is the name of the file or folder.
Locationurl returns the URL of the resource currently being displayed in webbrowser.
Busy returns a Boolean value indicating whether the webbrowser is currently loading the URL. If it returns true, you can use the stop method to cancel the ongoing access operation.
Webbrowser events
Private events description
Beforenavigate2 is triggered before the navigation occurs, but is not refreshed.
Commandstatechange is triggered when the activation status of the command changes. It indicates when back and forward are activated or disabled.
Menu item or button
Documentcomplete: when the entire document is completed, refresh the page.
Downloadbegin: When a download operation has started, the refresh event can also be triggered.
Downloadcomplete: When a download operation is completed, the refresh event can also be triggered.
Triggered when navigatecomplete2 is complete and not refreshed
Newwindow2 is triggered before a new window is created
Onfullscreen is triggered when the fullscreen attribute changes. This event uses an input parameter of varient_bool to indicate whether IE is displayed in full screen mode (varient_true) or normal mode (VAR ient_false)
Onmenubar is triggered when the menubar attribute is changed. It indicates that the parameter is of the varient_bool type.
Variant_true is visible, and Variant _ false is hidden
Whether the user closes the browser or the developer calls the quit method, onquit will be triggered when ie exits.
The onstatusbar and onmenubar call methods are the same, indicating whether the status bar is visible.
The ontoolbar call method is the same as above, indicating whether the toolbar is visible.
The onvisible control window is visible or hidden, and a varient_bool type parameter is also used.
Statustextchange if you want to change the text in the status bar, this event will be triggered, but it does not care whether the program has the status bar
This is triggered when titlechange title is valid or changed.