* Merge winforms framework content to working branch (#14) * Breadcrumb / TOC / Move net5 to net folder (#15) * change path from net5 to net * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Add .net 5 winforms placeholder article (#16) * added some metadata and adjusted net5 placeholder * corrections * corrections * corrections * Test1 * Swapping landing page vs concept * fix links * Fix links * Fix desc
2.2 KiB
title, description, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | description | ms.date | dev_langs | helpviewer_keywords | ms.assetid | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Add web browser capabilities to app | Learn how to add web browser capabilities to a Windows Forms application with the WebBrowser control. | 03/30/2017 |
|
|
3871f072-b57a-435b-9976-e5da28df04a7 |
How to add web browser capabilities to a Windows Forms application
With the xref:System.Windows.Forms.WebBrowser control, you can add Web browser functionality to your application. The control works like a Web browser by default. After you load an initial URL by setting the xref:System.Windows.Forms.WebBrowser.Url%2A property, you can navigate by clicking hyperlinks or by using keyboard shortcuts to move backward and forward through navigation history. By default, you can access additional browser functionality through the right-click shortcut menu. You can also open new documents by dropping them onto the control. The xref:System.Windows.Forms.WebBrowser control also has several properties, methods, and events that you can use to implement user interface features similar to those found in Internet Explorer.
The following code example implements an address bar, typical browser buttons, a File menu, a status bar, and a title bar that displays the current page title.
Example
[!code-cppSystem.Windows.Forms.WebBrowser#0] [!code-csharpSystem.Windows.Forms.WebBrowser#0] [!code-vbSystem.Windows.Forms.WebBrowser#0]
Compile the code
This example requires:
- References to the
System,System.Drawing, andSystem.Windows.Formsassemblies.