廢話少說,看代碼。。。
private AxSHDocVw.AxWebBrowser axWebBrowser1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1;
System.Threading.Thread thread1=new System.Threading.Thread(new System.Threading.ThreadStart(thread_WebBrowse));
thread1.Start();
private void thread_WebBrowse()
{
//這是一個try的用法,遇上錯誤拋出異常
try
{
Object n=null;
this.axWebBrowser1.Navigate("www.sina.com.cn",ref n,ref n,ref n,ref n);
}
catch(Exception ex)
{
this.label_Output.Text=ex.ToString();
}
}