C#实现WEB浏览器

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();
}


 
posted @ 2007-03-24 16:41  leonardleonard  阅读(457)  评论(0编辑  收藏  举报