本文使用VB.net 2005 Express進行下載: 下載的方式有二: (一)使用System.Net.WebClien下載, 範例如下: Dim 網址 as String = "Http://yahoo.com.tw/a.jpg" Dim 存檔路徑 as String = "C:\" Dim 存檔檔名 as String = "a.jpg" Dim strFilePath As String = 存檔路徑 + "\" + 存檔檔名 Dim dwl As New System.Net.WebClient() dwl.DownloadFile(網址, strFilePath) dwl.Dispose() (二)使用My.Computer.Network.DownloadFile下載*: 語法如下: My.Computer.Network.DownloadFile(address, destinationFileName, username, password, showUI,connectionTimeout, overwrite) 範例: My.Computer.Network.DownloadFile("http://192.168.1.1/download.ini", "C:\Program Files\download.ini", "", "", True, 500, True) *資料來源:藍色小舖http://www.blueshop.com.tw/board/show.asp?subcde=BRD20061120034834OAP
文章標籤
全站熱搜
創作者介紹
創作者 u8716054 的頭像
u8716054

~帥氣欣的帥氣旅程~

u8716054 發表在 痞客邦 留言(2) 人氣(6,556)