/// <summary> /// 打卡IE /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnIe_Click(object sender, EventArgs e) { WebBrowser webBro = new WebBrowser(); /* newWindow: ドキュメントを新しいブラウザ ウィンドウに読み込む場合は true。ドキュメントを System.Windows.Forms.WebBrowser コントロールに読み込む場合は false。 */ webBro.Navigate(this.txtUrl.Text, true); } /// <summary> /// 利用webBrowser浏览网页 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e) { this.Text = webBrowser1.DocumentTitle.ToString(); this.txtUrl.Text = webBrowser1.Url.ToString(); } /// <summary> /// 使用Process打开IE,打开网页为html /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnTest_Click(object sender, EventArgs e) { //Process myProcess = new Process(); //myProcess.StartInfo.FileName = "iexplore.exe"; //myProcess.StartInfo.Arguments = "http://community.csdn.net/"; //myProcess.Start(); WebForm form = new WebForm(); form.Show(); }