摘要:WinForm如何開啓InternetExplorer
SHDocVw.InternetExplorerClass IE;
public Form1()
{
InitializeComponent();
IE = new SHDocVw.InternetExplorerClass();//初始化建立Ie Class 這樣可以確保使用者不管按幾次都是開同一個視窗
}
private void button2_Click(object sender, EventArgs e)
{
object Empty = 0;
object URL = "http://www.live.com";
IE.Visible = true;
IE.Navigate2(ref URL, ref Empty, ref Empty, ref Empty, ref Empty);
}
public Form1()
{
InitializeComponent();
IE = new SHDocVw.InternetExplorerClass();//初始化建立Ie Class 這樣可以確保使用者不管按幾次都是開同一個視窗
}
private void button2_Click(object sender, EventArgs e)
{
object Empty = 0;
object URL = "http://www.live.com";
IE.Visible = true;
IE.Navigate2(ref URL, ref Empty, ref Empty, ref Empty, ref Empty);
}
參考網址
http://msdn.microsoft.com/en-us/library/aa752084(VS.85).aspx