Making your Web Browser in C#

Today we are creating our web browser by using C#.

Image1.jpg

In this picture we have 4 buttons 1 combobox and 1 webbrowser tools.

We use button1 to go to previous page, buton2 is for going next page.

Our text area is combobox1. We type here which site we need to go. Then we Click button3 to go.

Button 4 is home page.

namespace WEB_BROWSER

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        } 

        private void button3_Click(object sender, EventArgs e)

        {
            webBrowser1.Navigate(comboBox1.Text); 

        } 

        private void button2_Click(object sender, EventArgs e)

        {

            webBrowser2.GoForward();         

        } 

        private void button1_Click(object sender, EventArgs e)

        {

            webBrowser1.GoBack();        

        } 

        private void button4_Click(object sender, EventArgs e)

        {

            webBrowser1.GoHome();

        } 

        private void Form1_Load(object sender, EventArgs e)

        {

            webBrowser1.Navigate("www.google.com");

        }

    }

}

Here we go

Image2.jpg