十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊
量身定制 + 運(yùn)營維護(hù)+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
本篇內(nèi)容主要講解“C#怎么實現(xiàn)調(diào)用瀏覽器的功能”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“C#怎么實現(xiàn)調(diào)用瀏覽器的功能”吧!

創(chuàng)新互聯(lián)公司是專業(yè)的興海網(wǎng)站建設(shè)公司,興海接單;提供成都網(wǎng)站設(shè)計、網(wǎng)站制作,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行興海網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊,希望更多企業(yè)前來合作!
C#調(diào)用瀏覽器之調(diào)用IE:
System.Diagnostics.Process myProcess = new System.Diagnostics.Process(); myProcess.StartInfo.FileName = "iexplore.exe"; myProcess.StartInfo.Arguments = " http://www.net0and1.com/"; myProcess.Start();
C#調(diào)用瀏覽器之調(diào)用默認(rèn)瀏覽器:
string target= "http://www.net0and1.com"; //Use no more than one assignment when you test this code. //string target = "ftp://ftp.microsoft.com"; //string target = "C:\\Program Files\\Microsoft Visual Studio\\INSTALL.HTM"; try { System.Diagnostics.Process.Start(target); } catch ( System.ComponentModel.Win32Exception noBrowser) { if (noBrowser.ErrorCode==-2147467259) MessageBox.Show(noBrowser.Message); } catch (System.Exception other) { MessageBox.Show(other.Message); }到此,相信大家對“C#怎么實現(xiàn)調(diào)用瀏覽器的功能”有了更深的了解,不妨來實際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!