WebBrowser (wbr)
![]() | WebBrowser - Allows you to navigate web pages inside your form. |
Microsoft HTML Object Library / mshtml.dll
mshtml.IHTMLElement
mshtml.HTMLDocument
Remarks
If the navigation is unsuccessful, a page indicating the problem is displayed. Navigation with any of these members causes the Navigating, Navigated, and DocumentCompleted events to occur at different stages of navigation.
These and other members, such as the Stop and Refresh methods, let you implement user interface controls in your application similar to those in Internet Explorer. Some members are useful even when you do not want to display the WebBrowser control on your form. For example, you can use the Print method to print the latest version of a Web page without displaying the page to the user.
The WebBrowser control also lets you display content that you create in your application or you retrieve from a database or resource file. Use the DocumentText or DocumentStream property to get or set the contents of the current document as a string or data stream.
You can also manipulate the contents of a Web page through the Document property, which contains an HtmlDocument object that provides managed access to the HTML document object model (DOM) for the current page.
Useful Code
Me.WebBrowser1.Url = New System.Uri("http://www.bettersolutions.com")
Properties
| AllowNavigation | Gets or sets a value indicating whether the control can navigate to another page after its initial page has been loaded. |
| CanGoBack | Gets a value indicating whether a previous page in navigation history is available, which allows the GoBack method to succeed. |
| CanGoForward | Gets a value indicating whether a subsequent page in navigation history is available, which allows the GoForward method to succeed. |
| Document | Gets an HtmlDocument representing the Web page currently displayed in the WebBrowser control. |
| DocumentStream | Gets or sets a stream containing the contents of the Web page displayed in the WebBrowser control. |
| DocumentText | Gets or sets the HTML contents of the page displayed in the WebBrowser control. |
| DocumentTitle | Gets the title of the document currently displayed in the WebBrowser control. |
| DocumentType | Gets the type of the document currently displayed in the WebBrowser control. |
| IsBusy | Gets a value indicating whether the WebBrowser control is currently loading a new document. |
| IsOffline | Gets or sets a value indicating whether the WebBrowser control is in offline mode. |
| ReadyState | Gets a value indicating the current state of the WebBrowser control. |
| ScrollBarsEnabled | Gets or sets a value indicating whether scroll bars are displayed in the WebBrowser control. |
| StatusText | Gets the status text of the WebBrowser control. |
| URL | Gets or sets the URL of the current document. |
| AllowNavigation Gets or sets a value indicating whether the control can navigate to another page after its initial page has been loaded. |
| CanGoBack Gets a value indicating whether a previous page in navigation history is available, which allows the GoBack method to succeed. |
| CanGoForward Gets a value indicating whether a subsequent page in navigation history is available, which allows the GoForward method to succeed. |
| Document Gets an HtmlDocument representing the Web page currently displayed in the WebBrowser control. |
| DocumentStream Gets or sets a stream containing the contents of the Web page displayed in the WebBrowser control. |
| DocumentText Gets or sets the HTML contents of the page displayed in the WebBrowser control. |
| DocumentTitle Gets the title of the document currently displayed in the WebBrowser control. |
| DocumentType Gets the type of the document currently displayed in the WebBrowser control. |
| IsBusy Gets a value indicating whether the WebBrowser control is currently loading a new document. |
| IsOffline Gets or sets a value indicating whether the WebBrowser control is in offline mode. |
| ReadyState Gets a value indicating the current state of the WebBrowser control. |
| ScrollBarsEnabled Gets or sets a value indicating whether scroll bars are displayed in the WebBrowser control. |
| StatusText Gets the status text of the WebBrowser control. |
| URL Gets or sets the URL of the current document. |
Methods
| GoBack | Navigates the WebBrowser control to the previous page in the navigation history, if one is available. |
| GoForward | Navigates the WebBrowser control to the next page in the navigation history, if one is available. |
| GoHome | Navigates the WebBrowser control to the home page of the current user. |
| GoSearch | Navigates the WebBrowser control to the default search page of the current user. |
| Navigate | Overloaded. Loads the document at the specified location into the WebBrowser control. |
| Prints the document currently displayed in the WebBrowser control using the current print and page settings. | |
| Refresh | Overloaded. Overridden. Reloads the document currently displayed in the WebBrowser control. |
| 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 |
| GoBack Navigates the WebBrowser control to the previous page in the navigation history, if one is available. |
| GoForward Navigates the WebBrowser control to the next page in the navigation history, if one is available. |
| GoHome Navigates the WebBrowser control to the home page of the current user. |
| GoSearch Navigates the WebBrowser control to the default search page of the current user. |
| Navigate Overloaded. Loads the document at the specified location into the WebBrowser control. |
| Print Prints the document currently displayed in the WebBrowser control using the current print and page settings. |
| Refresh Overloaded. Overridden. Reloads the document currently displayed in the WebBrowser control. |
| 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 |
Events
| AutoSizeChanged | This event is not relevant for this class. (inherited from Control) |
| BackColorChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| BackgroundImageChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| BackgroundImageLayoutChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| BindingContextChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| CanGoBackChanged | Occurs when the CanGoBack property value changes. |
| CanGoForwardChanged | Occurs when the CanGoForward property value changes. |
| CausesValidationChanged | Occurs when the value of the CausesValidation property changes. (inherited from Control) |
| ChangeUICues | Occurs when the focus or keyboard user interface (UI) cues change. (inherited from WebBrowserBase) |
| Click | This event is not supported by this control. (inherited from WebBrowserBase) |
| ClientSizeChanged | Occurs when the value of the ClientSize property changes. (inherited from Control) |
| ContextMenuChanged | Occurs when the value of the ContextMenu property changes. (inherited from Control) |
| ContextMenuStripChanged | Occurs when the value of the ContextMenuStrip property changes. (inherited from Control) |
| ControlAdded | Occurs when a new control is added to the Control.ControlCollection. (inherited from Control) |
| ControlRemoved | Occurs when a control is removed from the Control.ControlCollection. (inherited from Control) |
| CursorChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component) |
| DockChanged | Occurs when the value of the Dock property changes. (inherited from Control) |
| DocumentCompleted | Occurs when the WebBrowser control finishes loading a document. |
| DocumentTitleChanged | Occurs when the DocumentTitle property value changes. |
| DoubleClick | This event is not supported by this control. (inherited from WebBrowserBase) |
| DragDrop | This event is not supported by this control. (inherited from WebBrowserBase) |
| DragEnter | This event is not supported by this control. (inherited from WebBrowserBase) |
| DragLeave | This event is not supported by this control. (inherited from WebBrowserBase) |
| DragOver | This event is not supported by this control. (inherited from WebBrowserBase) |
| EnabledChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| EncryptionLevelChanged | Occurs when the WebBrowser control navigates to or away from a Web site that uses encryption. |
| Enter | This event is not supported by this control. (inherited from WebBrowserBase) |
| FileDownload | Occurs when the WebBrowser control downloads a file. |
| FontChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| ForeColorChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| GiveFeedback | This event is not supported by this control. (inherited from WebBrowserBase) |
| GotFocus | Occurs when the control receives focus. (inherited from Control) |
| HandleCreated | Occurs when a handle is created for the control. (inherited from Control) |
| HandleDestroyed | Occurs when the control's handle is in the process of being destroyed. (inherited from Control) |
| HelpRequested | This event is not supported by this control. (inherited from WebBrowserBase) |
| ImeModeChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| Invalidated | Occurs when a control's display requires redrawing. (inherited from Control) |
| KeyDown | This event is not supported by this control. (inherited from WebBrowserBase) |
| KeyPress | This event is not supported by this control. (inherited from WebBrowserBase) |
| KeyUp | This event is not supported by this control. (inherited from WebBrowserBase) |
| Layout | This event is not supported by this control. (inherited from WebBrowserBase) |
| Leave | This event is not supported by this control. (inherited from WebBrowserBase) |
| LocationChanged | Occurs when the Location property value has changed. (inherited from Control) |
| LostFocus | Occurs when the control loses focus. (inherited from Control) |
| MarginChanged | Occurs when the control's margin changes. (inherited from Control) |
| MouseCaptureChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseClick | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseDoubleClick | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseDown | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseEnter | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseHover | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseLeave | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseMove | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseUp | This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseWheel | This event is not supported by this control. (inherited from WebBrowserBase) |
| Move | Occurs when the control is moved. (inherited from Control) |
| Navigated | Occurs when the WebBrowser control has navigated to a new document and has begun loading it. |
| Navigating | Occurs before the WebBrowser control navigates to a new document. |
| NewWindow | Occurs before a new browser window is opened. |
| PaddingChanged | Occurs when the value of the Padding property changes. |
| Paint | This event is not supported by this control. (inherited from WebBrowserBase) |
| ParentChanged | Occurs when the Parent property value changes. (inherited from Control) |
| PreviewKeyDown | Occurs before the KeyDown event when a key is pressed while focus is on this control. (inherited from Control) |
| ProgressChanged | Occurs when the WebBrowser control has updated information on the download progress of a document it is navigating to. |
| QueryAccessibilityHelp | This event is not supported by this control. (inherited from WebBrowserBase) |
| QueryContinueDrag | This event is not supported by this control. (inherited from WebBrowserBase) |
| RegionChanged | Occurs when the value of the Region property changes. (inherited from Control) |
| Resize | Occurs when the control is resized. (inherited from Control) |
| RightToLeftChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| SizeChanged | Occurs when the Size property value changes. (inherited from Control) |
| StatusTextChanged | Occurs when the StatusText property value changes. |
| StyleChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| SystemColorsChanged | Occurs when the system colors change. (inherited from Control) |
| TabIndexChanged | Occurs when the TabIndex property value changes. (inherited from Control) |
| TabStopChanged | Occurs when the TabStop property value changes. (inherited from Control) |
| TextChanged | This event is not supported by this control. (inherited from WebBrowserBase) |
| Validated | Occurs when the control is finished validating. (inherited from Control) |
| Validating | Occurs when the control is validating. (inherited from Control) |
| VisibleChanged | Occurs when the Visible property value changes. (inherited from Control) |
| AutoSizeChanged This event is not relevant for this class. (inherited from Control) |
| BackColorChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| BackgroundImageChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| BackgroundImageLayoutChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| BindingContextChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| CanGoBackChanged Occurs when the CanGoBack property value changes. |
| CanGoForwardChanged Occurs when the CanGoForward property value changes. |
| CausesValidationChanged Occurs when the value of the CausesValidation property changes. (inherited from Control) |
| ChangeUICues Occurs when the focus or keyboard user interface (UI) cues change. (inherited from WebBrowserBase) |
| Click This event is not supported by this control. (inherited from WebBrowserBase) |
| ClientSizeChanged Occurs when the value of the ClientSize property changes. (inherited from Control) |
| ContextMenuChanged Occurs when the value of the ContextMenu property changes. (inherited from Control) |
| ContextMenuStripChanged Occurs when the value of the ContextMenuStrip property changes. (inherited from Control) |
| ControlAdded Occurs when a new control is added to the Control.ControlCollection. (inherited from Control) |
| ControlRemoved Occurs when a control is removed from the Control.ControlCollection. (inherited from Control) |
| CursorChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| Disposed Occurs when the component is disposed by a call to the Dispose method. (inherited from Component) |
| DockChanged Occurs when the value of the Dock property changes. (inherited from Control) |
| DocumentCompleted Occurs when the WebBrowser control finishes loading a document. |
| DocumentTitleChanged Occurs when the DocumentTitle property value changes. |
| DoubleClick This event is not supported by this control. (inherited from WebBrowserBase) |
| DragDrop This event is not supported by this control. (inherited from WebBrowserBase) |
| DragEnter This event is not supported by this control. (inherited from WebBrowserBase) |
| DragLeave This event is not supported by this control. (inherited from WebBrowserBase) |
| DragOver This event is not supported by this control. (inherited from WebBrowserBase) |
| EnabledChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| EncryptionLevelChanged Occurs when the WebBrowser control navigates to or away from a Web site that uses encryption. |
| Enter This event is not supported by this control. (inherited from WebBrowserBase) |
| FileDownload Occurs when the WebBrowser control downloads a file. |
| FontChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| ForeColorChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| GiveFeedback This event is not supported by this control. (inherited from WebBrowserBase) |
| GotFocus Occurs when the control receives focus. (inherited from Control) |
| HandleCreated Occurs when a handle is created for the control. (inherited from Control) |
| HandleDestroyed Occurs when the control's handle is in the process of being destroyed. (inherited from Control) |
| HelpRequested This event is not supported by this control. (inherited from WebBrowserBase) |
| ImeModeChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| Invalidated Occurs when a control's display requires redrawing. (inherited from Control) |
| KeyDown This event is not supported by this control. (inherited from WebBrowserBase) |
| KeyPress This event is not supported by this control. (inherited from WebBrowserBase) |
| KeyUp This event is not supported by this control. (inherited from WebBrowserBase) |
| Layout This event is not supported by this control. (inherited from WebBrowserBase) |
| Leave This event is not supported by this control. (inherited from WebBrowserBase) |
| LocationChanged Occurs when the Location property value has changed. (inherited from Control) |
| LostFocus Occurs when the control loses focus. (inherited from Control) |
| MarginChanged Occurs when the control's margin changes. (inherited from Control) |
| MouseCaptureChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseClick This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseDoubleClick This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseDown This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseEnter This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseHover This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseLeave This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseMove This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseUp This event is not supported by this control. (inherited from WebBrowserBase) |
| MouseWheel This event is not supported by this control. (inherited from WebBrowserBase) |
| Move Occurs when the control is moved. (inherited from Control) |
| Navigated Occurs when the WebBrowser control has navigated to a new document and has begun loading it. |
| Navigating Occurs before the WebBrowser control navigates to a new document. |
| NewWindow Occurs before a new browser window is opened. |
| PaddingChanged Occurs when the value of the Padding property changes. |
| Paint This event is not supported by this control. (inherited from WebBrowserBase) |
| ParentChanged Occurs when the Parent property value changes. (inherited from Control) |
| PreviewKeyDown Occurs before the KeyDown event when a key is pressed while focus is on this control. (inherited from Control) |
| ProgressChanged Occurs when the WebBrowser control has updated information on the download progress of a document it is navigating to. |
| QueryAccessibilityHelp This event is not supported by this control. (inherited from WebBrowserBase) |
| QueryContinueDrag This event is not supported by this control. (inherited from WebBrowserBase) |
| RegionChanged Occurs when the value of the Region property changes. (inherited from Control) |
| Resize Occurs when the control is resized. (inherited from Control) |
| RightToLeftChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| SizeChanged Occurs when the Size property value changes. (inherited from Control) |
| StatusTextChanged Occurs when the StatusText property value changes. |
| StyleChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| SystemColorsChanged Occurs when the system colors change. (inherited from Control) |
| TabIndexChanged Occurs when the TabIndex property value changes. (inherited from Control) |
| TabStopChanged Occurs when the TabStop property value changes. (inherited from Control) |
| TextChanged This event is not supported by this control. (inherited from WebBrowserBase) |
| Validated Occurs when the control is finished validating. (inherited from Control) |
| Validating Occurs when the control is validating. (inherited from Control) |
| VisibleChanged Occurs when the Visible property value changes. (inherited from Control) |
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext
