9 个解决方案
#1
这样,你写一个ocx嵌到网页中,用户打开这个网页。这个ocx就从服务器上下载文件保存到本地。
#2
有了思路,
实现应该比较简单,传输文件可以使用winSock
实现应该比较简单,传输文件可以使用winSock
#3
我有一个使用WinSock拷贝文件的程序
E-Mail:sw@batterytesting.com.cn
E-Mail:sw@batterytesting.com.cn
#4
不用winsock,这个问题我到是经常回答无论是上传还是下载,http://blog.csdn.net/liuxiaoyi666
#5
http://blog.csdn.net/liuxiaoyi666/archive/2005/01/26/269661.aspx
#6
用IE来下载
Private Declare Function DoFileDownload Lib "shdocvw.dll" (ByVal lpszFile As String) As Long
Private Sub Command1_Click()
Dim sDownload As String
sDownload = StrConv(Text1.Text, vbUnicode)
Call DoFileDownload(sDownload)
End Sub
Private Sub Form_Load()
Text1.Text = "http://www.chat.ru/~softdaily/fo-ag162.zip"
Form1.Caption = "Audiograbber 1.62 Full"
Text2.Text = "http://www6.50megs.com/audiograbber/demos/cr-ag161.zip"
End Sub
Private Declare Function DoFileDownload Lib "shdocvw.dll" (ByVal lpszFile As String) As Long
Private Sub Command1_Click()
Dim sDownload As String
sDownload = StrConv(Text1.Text, vbUnicode)
Call DoFileDownload(sDownload)
End Sub
Private Sub Form_Load()
Text1.Text = "http://www.chat.ru/~softdaily/fo-ag162.zip"
Form1.Caption = "Audiograbber 1.62 Full"
Text2.Text = "http://www6.50megs.com/audiograbber/demos/cr-ag161.zip"
End Sub
#7
'把指定给定一个网络文件(任何类型,可以是图像文件)的地址,然后用程序把其保存为本机器的文件
Public Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
'保存网上的图片到硬盘
'URL是图版的网址
'LocalFilename 是保存到本地的文件名及目录
'使用例子:DownloadFile "http://www.21cn.com/aa.jpg","c:\aa.jpg"
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Public Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
'保存网上的图片到硬盘
'URL是图版的网址
'LocalFilename 是保存到本地的文件名及目录
'使用例子:DownloadFile "http://www.21cn.com/aa.jpg","c:\aa.jpg"
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
#8
up
#9
mark
#1
这样,你写一个ocx嵌到网页中,用户打开这个网页。这个ocx就从服务器上下载文件保存到本地。
#2
有了思路,
实现应该比较简单,传输文件可以使用winSock
实现应该比较简单,传输文件可以使用winSock
#3
我有一个使用WinSock拷贝文件的程序
E-Mail:sw@batterytesting.com.cn
E-Mail:sw@batterytesting.com.cn
#4
不用winsock,这个问题我到是经常回答无论是上传还是下载,http://blog.csdn.net/liuxiaoyi666
#5
http://blog.csdn.net/liuxiaoyi666/archive/2005/01/26/269661.aspx
#6
用IE来下载
Private Declare Function DoFileDownload Lib "shdocvw.dll" (ByVal lpszFile As String) As Long
Private Sub Command1_Click()
Dim sDownload As String
sDownload = StrConv(Text1.Text, vbUnicode)
Call DoFileDownload(sDownload)
End Sub
Private Sub Form_Load()
Text1.Text = "http://www.chat.ru/~softdaily/fo-ag162.zip"
Form1.Caption = "Audiograbber 1.62 Full"
Text2.Text = "http://www6.50megs.com/audiograbber/demos/cr-ag161.zip"
End Sub
Private Declare Function DoFileDownload Lib "shdocvw.dll" (ByVal lpszFile As String) As Long
Private Sub Command1_Click()
Dim sDownload As String
sDownload = StrConv(Text1.Text, vbUnicode)
Call DoFileDownload(sDownload)
End Sub
Private Sub Form_Load()
Text1.Text = "http://www.chat.ru/~softdaily/fo-ag162.zip"
Form1.Caption = "Audiograbber 1.62 Full"
Text2.Text = "http://www6.50megs.com/audiograbber/demos/cr-ag161.zip"
End Sub
#7
'把指定给定一个网络文件(任何类型,可以是图像文件)的地址,然后用程序把其保存为本机器的文件
Public Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
'保存网上的图片到硬盘
'URL是图版的网址
'LocalFilename 是保存到本地的文件名及目录
'使用例子:DownloadFile "http://www.21cn.com/aa.jpg","c:\aa.jpg"
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Public Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
'保存网上的图片到硬盘
'URL是图版的网址
'LocalFilename 是保存到本地的文件名及目录
'使用例子:DownloadFile "http://www.21cn.com/aa.jpg","c:\aa.jpg"
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
#8
up
#9
mark