WebBrowser.Navigate : WebBrowser « System.Windows.Forms « C# / C Sharp by API






WebBrowser.Navigate

 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

public class Form1 : Form
{
  private System.Windows.Forms.WebBrowser webBrowser1;

  public Form1() {
        InitializeComponent();
        webBrowser1.Navigate("http://www.java2s.com");
  }
  private void InitializeComponent()
  {
        this.webBrowser1 = new System.Windows.Forms.WebBrowser();
        this.SuspendLayout();
        // 
        // webBrowser1
        // 
        this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.webBrowser1.Location = new System.Drawing.Point(0, 0);
        this.webBrowser1.Name = "webBrowser1";
        this.webBrowser1.Size = new System.Drawing.Size(600, 600);
        this.webBrowser1.TabIndex = 0;
        // 
        // Form1
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(600, 600);
        this.Controls.Add(this.webBrowser1);
        this.Text = "Split Window";
        this.ResumeLayout(false);

  }

  [STAThread]
  static void Main()
  {
    Application.EnableVisualStyles();
    Application.Run(new Form1());
  }

}

   
  








Related examples in the same category

1.WebBrowser.CanGoForward
2.WebBrowser.DocumentTitle
3.WebBrowser.GoForward()
4.WebBrowser.GoHome()
5.WebBrowser.Refresh()
6.WebBrowser.Url