---
title: "How to use WebBrowser Controls in  Windows Forms Application c# .net"  
description: "How to use WebBrowser Controls in  Windows Forms Application c# .net"  
author: "Anonymous User"  
published: 2016-01-01  
updated: 2023-07-03  
canonical: https://www.mindstick.com/forum/33817/how-to-use-webbrowser-controls-in-windows-forms-application-c-sharp-dot-net  
category: ".net"  
tags: ["c#", ".net"]  
reading_time: 2 minutes  

---

# How to use WebBrowser Controls in  Windows Forms Application c# .net

I want to use WebBrowser [Controls](https://www.mindstick.com/articles/66/how-to-create-controls-at-run-time-in-csharp-dot-net) in [Windows](https://www.mindstick.com/articles/311752/how-to-install-and-use-the-google-wifi-software-on-a-windows-or-mac-computer) [Forms](https://www.mindstick.com/interview/34192/what-is-the-purpose-of-the-authentication-mode-forms-element-in-web-config) [Application](https://www.mindstick.com/articles/12824/calculator-application-in-android) [c# .net](https://www.mindstick.com/forum/159581/how-to-design-a-calculator-program-in-c-sharp-dot-net).How to do this please give me a small demo.

## Replies

### Reply by Aryan Kumar

Sure, here are the steps on how to use web browser controls in Windows Forms application C# .NET:

1. Add a WebBrowser control to your Windows Forms form.
2. Set the URL of the web page that you want to display in the WebBrowser control.
3. Bind the WebBrowser control to an event handler.
4. In the event handler, write code to handle the events of the WebBrowser control.

Here is an example of the code:

C#

```plaintext
private void WebBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
    // Get the URL of the web page that was navigated to
    string url = e.Url.ToString();

    // Write code to handle the navigation event
    // For example, you can display a message box with the URL of the web page that was navigated to
    MessageBox.Show(url);
}
```

This code will add a WebBrowser control to your Windows Forms form. The URL of the web page that you want to display in the WebBrowser control will be set in the code-behind file. The WebBrowser control will be bound to the `Navigated` event handler. The `Navigated` event handler will be triggered when the WebBrowser control navigates to a new web page. The code in the `Navigated` event handler will display a message box with the URL of the web page that was navigated to.

### Reply by Anonymous User

Goto This Link

[https://www.mindstick.com/Articles/bd89779f-66e6-4497-94ee-de2821473e7a/WebBrowser%20Control%20in%20C%20Net](https://www.mindstick.com/Articles/bd89779f-66e6-4497-94ee-de2821473e7a/WebBrowser%20Control%20in%20C%20Net)


---

Original Source: https://www.mindstick.com/forum/33817/how-to-use-webbrowser-controls-in-windows-forms-application-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
