Advertisement
Guest User

Untitled

a guest
Nov 18th, 2013
2,500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // http://www.dotnetperls.com/webbrowser
  2. using System;
  3. using System.Windows.Forms;
  4.  
  5. namespace WindowsFormsApplication1
  6. {
  7.     public partial class Form1 : Form
  8.     {
  9.       public Form1()
  10.       {
  11.           InitializeComponent();
  12.       }
  13.  
  14.       private void Form1_Load(object sender, EventArgs e)
  15.       {
  16.           webBrowser1.Navigate("http://habrahabr.ru/");
  17.       }
  18.  
  19.       private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
  20.       {
  21.           this.Text = "Navigating";
  22.       }
  23.  
  24.       private void webBrowser1_DocumentCompleted(object sender,
  25.           WebBrowserDocumentCompletedEventArgs e)
  26.       {
  27.           this.Text = e.Url.ToString() + " loaded";
  28.       }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement