Sunday, May 11, 2014

How to create a Web Browser using C#.NET Windows Form Application....

Open Visual Studio.
New Project -> Windows Form Application.

Design the form as shown below:-


Double click on go button and write the following code :-

webBrowser1.Navigate(textBox1.Text);

Double click on back button :-

webBrowser1.GoBack();

Double click on forward button :-

webBrowser1.GoForward();

Double click on refresh button:-

webBrowser1.Refresh();

now select webbrowser control. Go to properties. Go to Event. Double click on Navigated Event :-

private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
        {
            textBox1.Text = webBrowser1.Url.ToString();
        }

Execute and enjoy browsing :p :)

No comments:

Post a Comment