WebBrowser Class
The WebBrowser is a form control allows you to duplicate Internet Explorer (IE) functionality inside of an EasyLanguage Application. For example, by adding a web browser control to a form you can display external web resources and data including news stories and video, interactive tutorials, trading chat room access, and custom dashboards. Additionally, this control will allow you to create programmatically created HTML commentary, similar to the existing Analysis Commentary, but with much more flexibility and fewer restrictions.
Use of this control follows the same pattern as other EasyLanguage WinForm controls. The control must be created prior to use by calling the Create method. Once created, it can be added to a WinForm using the AddControl method.
The WebBrowser control includes features such as navigating to a URL, moving backwards and forwards through navigation history, searching, printing, and accessing browser properties are supported. Additionally, navigation and document loading events can be monitored.
Namespace: elsystem.windows.forms
Properties
Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).
Name | Type | Description | |
AllowNavigation | bool | True if the control can navigate to another page after its initial page has been loaded. | |
AllowWebBrowserDrop | bool | True if the control navigates to documents that are dropped onto it. | |
CanGoBack | bool | True if the control can navigate backward to a previous page (if history available) using the GoBack method. | |
CanGoForward | bool | True if the control can navigate forward to a subsequent page (if history available) using the GoForward method. | |
Document | object | Gets an HtmlDocument representing the Web page currently displayed in the control. | |
DocumentText | string | Gets or sets the HTML contents of the page displayed in the WebBrowser control. Returns an empty string ("") if no document is loaded. | |
DocumentTitle | string | Gets the title of the current document. Returns an empty string ("") if no document is loaded. | |
DocumentType | string | Gets the type of the current document. | |
Enabled | bool | True if the control is enabled. | |
IsBusy | bool | True if the control is busy loading a document. | |
IsOffline | bool | True if the WebBrowser control is in offline mode. | |
IsWebBrowserContextMenuEnabled | bool | True if the WebBrowser control shortcut menu is enabled (default is true). | |
ReadyState | enum | Gets a value indicating the current state of the control. See WebBrowserReadyState for a list of possible values. | |
RightToLeft | bool | True indicates that the text appears from right to left, such as when using Hebrew or Arabic fonts. | |
ScriptErrorsSuppressed | bool | True to hide any dialogs that result from script errors from a page displayed in the control. | |
ScrollBarsEnabled | bool | True if scroll bars are to be displayed in the control. | |
StatusText | string | Gets the a status text message that contains information such as the URL of a hyperlink when the mouse pointer hovers over it and the URL of the document currently being loaded. | |
Text | string | Not a user property. Reserved for future use. | |
Url | string | Gets or sets the URL (web address) of the current document. | |
WebBrowserShortcutsEnabled | bool | True if keyboard shortcuts are enabled within the control. |
Methods
Name | Description | |
Create | Initializes a new instance of the control. | |
Create (width,height) | Initializes a new instance of the control. Parameters include the Width and Height of the control. | |
GoBack | Navigates the WebBrowser to the previous page in the navigation history, if one is available. True if successful. | |
GoForward | Navigates the WebBrowser to the next page in the navigation history, if one is available. True if successful. | |
GoHome | Navigates the WebBrowser to the home page of the current user. | |
GoSearch | Navigates the WebBrowser to the default search page of the current user. | |
Navigate(Url) | Loads the document at the specified Uniform Resource Locator (URL) into the WebBrowser, replacing the previous document. | |
Navigate(Url,NewWindow) | Loads the document at the specified Uniform Resource Locator (URL) into a new browser window if NewWindow is True. | |
Prints the document currently displayed in the WebBrowser using the current print and page settings. | ||
Refresh | Reloads the document currently displayed in the WebBrowser by checking the server for an updated version. | |
ShowPageSetupDialog | Opens the Internet Explorer Page Setup dialog box. | |
ShowPrintDialog | Opens the Internet Explorer Print dialog box without setting header and footer values. | |
ShowPrintPreviewDialog | Opens the Internet Explorer Print Preview dialog box. | |
ShowPropertiesDialog | Opens the Internet Explorer Properties dialog box for the current document. | |
ShowSaveAsDialog | Opens the Internet Explorer Save Web Page dialog box or the Save dialog box of the hosted document if it is not an HTML page. | |
Stop | Cancels any pending navigation and stops any dynamic page elements, such as background sounds and animations. |
Events
Name | Description | |
CanGoBackChanged | Occurs when the CanGoBack property value changes. See EventArgs for the properties returned by the handler's args parameter. | |
CanGoFowardChanged | Occurs when the CanGoForward property value changes. See EventArgs for the properties returned by the handler's args parameter. | |
DocumentCompleted | Occurs when the WebBrowser control finishes loading a document. See WebBrowserDocumentCompletedEventArgs for the properties returned by the handler's args parameter. | |
DocumentTitleChanged | Occurs when the DocumentTitle property value changes. See EventArgs for the properties returned by the handler's args parameter. | |
Navigated | Occurs when the WebBrowser control has navigated to a new document and has begun loading it. See WebBrowserNavigatedEventArgs for the properties returned by the handler's args parameter. | |
Navigating | Occurs before the WebBrowser control navigates to a new document. See WebBrowserNavigatingEventArgs for the properties returned by the handler's args parameter. | |
ProgressChanged | Occurs when the WebBrowser control has updated information on the download progress of a document it is navigating to. See EventArgs for the properties returned by the handler's args parameter. | |
StatusTextChanged | Occurs when the StatusText property value changes. See EventArgs for the properties returned by the handler's args parameter. |
Inheritance Hierarchy
elsystem.windows.forms.ELWFComponent
elsystem.windows.forms.Control
elsystem.windows.forms.WebBrowser