Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Creating Multi Browser Windows Application in .NET 2.0.

Author: DevASP
Download Source Code : 637_WebBrowser.zip

In this simple article you will learn that how you can Create Multi Browser Windows Application.

Simply just create New Project of console application in C#.

 

Drag four Brower Control, five text box and thirty buttons on form.

 

 

 

Now just write code against these events

 

 

private void button1_Click(object sender, EventArgs e)

        {

            webBrowser1.Navigate(textBox1.Text,true );

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            webBrowser2.Navigate(textBox2.Text);

        }

 

        private void button4_Click(object sender, EventArgs e)

        {

            webBrowser3.Navigate(textBox3.Text);

        }

 

        private void button3_Click(object sender, EventArgs e)

        {

            webBrowser4.Navigate(textbox4.Text);

        }

 

        private void button5_Click(object sender, EventArgs e)

        {

            webBrowser1.Refresh();

        }

 

        private void button6_Click(object sender, EventArgs e)

        {

            webBrowser2.Refresh();

        }

 

        private void button7_Click(object sender, EventArgs e)

        {

            webBrowser3.Refresh();

        }

 

        private void button8_Click(object sender, EventArgs e)

        {

            webBrowser4.Refresh();

        }

 

        private void button10_Click(object sender, EventArgs e)

        {

            webBrowser1.Stop();

           

        }

 

        private void button11_Click(object sender, EventArgs e)

        {

            webBrowser1.GoBack();

        }

 

        private void button12_Click(object sender, EventArgs e)

        {

            webBrowser1.GoForward();

        }

 

        private void button13_Click(object sender, EventArgs e)

        {

            webBrowser1.GoHome();

        }

 

        private void button17_Click(object sender, EventArgs e)

        {

            webBrowser2.Stop();

        }

 

        private void button16_Click(object sender, EventArgs e)

        {

            webBrowser2.GoBack();

        }

 

        private void button15_Click(object sender, EventArgs e)

        {

            webBrowser2.GoForward();

        }

 

        private void button14_Click(object sender, EventArgs e)

        {

            webBrowser2.GoHome();

        }

 

        private void button21_Click(object sender, EventArgs e)

        {

            webBrowser3.Stop();

        }

 

        private void button20_Click(object sender, EventArgs e)

        {

            webBrowser3.GoBack();

        }

 

        private void button19_Click(object sender, EventArgs e)

        {

            webBrowser3.GoForward();

        }

 

        private void button18_Click(object sender, EventArgs e)

        {

            webBrowser3.GoHome();

        }

 

        private void button25_Click(object sender, EventArgs e)

        {

            webBrowser4.Stop();

 

        }

 

        private void button24_Click(object sender, EventArgs e)

        {

            webBrowser4.GoBack();

        }

 

        private void button23_Click(object sender, EventArgs e)

        {

            webBrowser4.GoForward();

        }

 

        private void button22_Click(object sender, EventArgs e)

        {

            webBrowser4.GoHome();

        }

 

        private void button9_Click(object sender, EventArgs e)

        {

            webBrowser1.Navigate(textBox5.Text);

            webBrowser2.Navigate(textBox5.Text);

            webBrowser3.Navigate(textBox5.Text);

            webBrowser4.Navigate(textBox5.Text);

        }

 

        private void button29_Click(object sender, EventArgs e)

        {

            webBrowser1.Stop();

            webBrowser2.Stop();

            webBrowser3.Stop();

            webBrowser4.Stop();

 

        }

 

        private void button28_Click(object sender, EventArgs e)

        {

            webBrowser1.GoBack();

            webBrowser2.GoBack();

            webBrowser3.GoBack();

            webBrowser4.GoBack();

        }

 

        private void button27_Click(object sender, EventArgs e)

        {

            webBrowser1.GoForward();

            webBrowser2.GoForward();

            webBrowser3.GoForward();

            webBrowser4.GoForward();

 

        }

 

        private void button26_Click(object sender, EventArgs e)

        {

            webBrowser1.GoHome();

            webBrowser2.GoHome();

            webBrowser3.GoHome();

            webBrowser4.GoHome();

 

        }

 

        private void button30_Click(object sender, EventArgs e)

        {

            webBrowser1.Refresh();

            webBrowser2.Refresh();

            webBrowser3.Refresh();

            webBrowser4.Refresh();

 

        }

 

        private void Form1_Load(object sender, EventArgs e)

        {

            this.Text = "DevAsp Browser";

        }

 

        private void webBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)

        {

            progressBar1.Value = (int)e.CurrentProgress/10;

            this.Text = e.MaximumProgress.ToString();

            if (e.MaximumProgress == 0)

                progressBar1.Visible = false;

            else

                progressBar1.Visible = true;

           

        }

Article Comments
coding is really fine , i, have a query , if we want to trace all the url in a particular page using vb.net then how is it possible, for example :

in our database url := http://kjkjkdjkdjkd.com/kjfkjfdj etc are given and if we wnt to trace , if another url exist in that page.

Posted on 12/9/2006 1:27:54 AM by hitendra

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< How we can Copy and Delete Folders with C#.net application in .NET 2.0.

Disclaimer - Privacy
© 2002-2017 DevASP.net