---
title: "How to: Print with a WebBrowser Control"
ms.date: "03/30/2017"
dev_langs: 
  - "csharp"
  - "vb"
f1_keywords: 
  - "WebBrowser.Print"
helpviewer_keywords: 
  - "printing [Windows Forms], Web pages"
  - "WebBrowser control [Windows Forms], examples"
  - "WebBrowser control [Windows Forms], printing from"
  - "Web pages [Windows Forms], printing"
  - "examples [Windows Forms], WebBrowser control"
ms.assetid: 3fb2a305-64ce-4b6c-9258-5330d3f21b6c
---
# How to: Print with a WebBrowser Control
The following code example demonstrates how use the <xref:System.Windows.Forms.WebBrowser> control to print a Web page without displaying it.  
  
## Example  
 [!code-csharp[WebBrowserMisc#10](~/samples/snippets/csharp/VS_Snippets_Winforms/WebBrowserMisc/CS/WebBrowserMisc.cs#10)]
 [!code-vb[WebBrowserMisc#10](~/samples/snippets/visualbasic/VS_Snippets_Winforms/WebBrowserMisc/vb/WebBrowserMisc.vb#10)]  
  
## Compiling the Code  
 This example requires:  
  
- References to the `System` and `System.Windows.Forms` assemblies.  
  
## See also

- <xref:System.Windows.Forms.WebBrowser>
- <xref:System.Windows.Forms.WebBrowser.Print%2A>
- <xref:System.Windows.Forms.WebBrowser.Url%2A>
- [How to: Navigate to a URL with the WebBrowser Control](how-to-navigate-to-a-url-with-the-webbrowser-control.md)
- [How to: Add Web Browser Capabilities to a Windows Forms Application](how-to-add-web-browser-capabilities-to-a-windows-forms-application.md)
- [How to: Create an HTML Document Viewer in a Windows Forms Application](how-to-create-an-html-document-viewer-in-a-windows-forms-application.md)
- [WebBrowser Control Overview](webbrowser-control-overview.md)
- [WebBrowser Security](webbrowser-security.md)
