重慶分公司,新征程啟航
為企業(yè)提供網(wǎng)站建設(shè)、域名注冊(cè)、服務(wù)器等服務(wù)
為企業(yè)提供網(wǎng)站建設(shè)、域名注冊(cè)、服務(wù)器等服務(wù)
本篇內(nèi)容主要講解“C#怎么實(shí)現(xiàn)調(diào)用瀏覽器的功能”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“C#怎么實(shí)現(xiàn)調(diào)用瀏覽器的功能”吧!
創(chuàng)新互聯(lián)公司是專(zhuān)業(yè)的興海網(wǎng)站建設(shè)公司,興海接單;提供成都網(wǎng)站設(shè)計(jì)、網(wǎng)站制作,網(wǎng)頁(yè)設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專(zhuān)業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行興海網(wǎng)站開(kāi)發(fā)網(wǎng)頁(yè)制作和功能擴(kuò)展;專(zhuān)業(yè)做搜索引擎喜愛(ài)的網(wǎng)站,專(zhuān)業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來(lái)合作!
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); }
到此,相信大家對(duì)“C#怎么實(shí)現(xiàn)調(diào)用瀏覽器的功能”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢(xún),關(guān)注我們,繼續(xù)學(xué)習(xí)!