---
title: "Creating Web Browser Application in Windows Forms"  
description: "First, you have to add a namespace in your existing namespaces that will be System.Net which will provide the functionality to represent the networkin"  
author: "Anurag Chaurasia"  
published: 2011-02-14  
updated: 2019-09-21  
canonical: https://www.mindstick.com/articles/449/creating-web-browser-application-in-windows-forms  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Creating Web Browser Application in Windows Forms

**·** First, you have to add a namespace in your existing namespaces that will be System.Net which will provide the functionality to represent the networking related facilities in our programming.

**·** Then On your GUI window add two panels into your windows form.

**·** In first panel you have to add one label and text box and also five buttons and put the text properties of these buttons like Go, Forward, Backward, Home & Refresh.

**·** In the second panel you have to add a web browser control from the toolbox.

**·** Now double click on every button and put that code

Code:

```
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Net;  namespace Web_Browser{     public partial class Form1 : Form    {         public Form1()         {            InitializeComponent();         }           private void button1_Click(object sender, EventArgs e)         {            webBrowser1.Navigate(textBox1.Text);         }           private void button2_Click(object sender, EventArgs e)         {            webBrowser1.GoForward();         }           private void button3_Click(object sender, EventArgs e)         {            webBrowser1.GoBack();         }           private void button4_Click(object sender, EventArgs e)         {            webBrowser1.Refresh();         }           private void button5_Click(object sender, EventArgs e)         {            webBrowser1.GoHome();         }    }}
```

Now run the programme and you will see the output like that…..

![Creating Web Browser Application in Windows Forms](https://www.mindstick.com/mindstickarticle/c48b6f39-60bf-4b9e-a999-ad79e246c178/images/385d7518-86d3-4bdf-b0cd-41d6ea2b2f21.png)

---

Original Source: https://www.mindstick.com/articles/449/creating-web-browser-application-in-windows-forms

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
