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
Public property AllowNavigation bool True if the control can navigate to another page after its initial page has been loaded.
Public property AllowWebBrowserDrop bool True if the control navigates to documents that are dropped onto it.
Public property CanGoBack bool True if the control can navigate backward to a previous page (if history available) using the GoBack method.
Public property CanGoForward bool True if the control can navigate forward to a subsequent page (if history available) using the GoForward method.
Public property Document object Gets an HtmlDocument representing the Web page currently displayed in the control.
Public property 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.
Public property DocumentTitle string Gets the title of the current document. Returns an empty string ("") if no document is loaded.
Public property DocumentType string Gets the type of the current document.
Public property Enabled bool True if the control is enabled.
Public property IsBusy bool True if the control is busy loading a document.
Public property IsOffline bool True if the WebBrowser control is in offline mode.
Public property IsWebBrowserContextMenuEnabled bool True if the WebBrowser control shortcut menu is enabled (default is true).
Public property ReadyState enum Gets a value indicating the current state of the control. See WebBrowserReadyState for a list of possible values.
Public property RightToLeft bool True indicates that the text appears from right to left, such as when using Hebrew or Arabic fonts.
Public property ScriptErrorsSuppressed bool True to hide any dialogs that result from script errors from a page displayed in the control.
Public property ScrollBarsEnabled bool True if scroll bars are to be displayed in the control.
Public property 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.
Public property Text string Not a user property. Reserved for future use.
Public property Url string Gets or sets the URL (web address) of the current document.
Public property WebBrowserShortcutsEnabled bool True if keyboard shortcuts are enabled within the control.
Methods
  Name Description
Public property Create Initializes a new instance of the control.   
Public property Create (width,height) Initializes a new instance of the control.   Parameters include the Width and Height of the control.
Public property GoBack Navigates the WebBrowser to the previous page in the navigation history, if one is available. True if successful.
Public property GoForward Navigates the WebBrowser to the next page in the navigation history, if one is available. True if successful.
Public property GoHome Navigates the WebBrowser to the home page of the current user.
Public property GoSearch Navigates the WebBrowser to the default search page of the current user.
Public property Navigate(Url) Loads the document at the specified Uniform Resource Locator (URL) into the WebBrowser, replacing the previous document.
Public property Navigate(Url,NewWindow) Loads the document at the specified Uniform Resource Locator (URL) into a new browser window if NewWindow is True.
Public property Print Prints the document currently displayed in the WebBrowser using the current print and page settings.
Public property Refresh Reloads the document currently displayed in the WebBrowser by checking the server for an updated version.
Public property ShowPageSetupDialog Opens the Internet Explorer Page Setup dialog box.
Public property ShowPrintDialog Opens the Internet Explorer Print dialog box without setting header and footer values.
Public property ShowPrintPreviewDialog Opens the Internet Explorer Print Preview dialog box.
Public property ShowPropertiesDialog Opens the Internet Explorer Properties dialog box for the current document.
Public property 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.
Public property Stop Cancels any pending navigation and stops any dynamic page elements, such as background sounds and animations.
Events
  Name Description
Public event CanGoBackChanged Occurs when the CanGoBack property value changes. See EventArgs for the properties returned by the handler's args parameter.
Public event CanGoFowardChanged Occurs when the CanGoForward property value changes. See EventArgs for the properties returned by the handler's args parameter.
Public event DocumentCompleted Occurs when the WebBrowser control finishes loading a document. See WebBrowserDocumentCompletedEventArgs for the properties returned by the handler's args parameter.
Public event DocumentTitleChanged Occurs when the DocumentTitle property value changes. See EventArgs for the properties returned by the handler's args parameter.
Public event 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.
Public event Navigating Occurs before the WebBrowser control navigates to a new document. See WebBrowserNavigatingEventArgs for the properties returned by the handler's args parameter.
Public event 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.
Public event StatusTextChanged Occurs when the StatusText property value changes. See EventArgs for the properties returned by the handler's args parameter.