用inet控制元件傳輸檔案到FTP時,保持這個狀態不變:icReceivingResponse
大家知道原因嗎,幫幫忙,謝謝
uj5u.com熱心網友回復:
我使用的是execute方法uj5u.com熱心網友回復:
CommonDialog1.Flags = cdlOFNFileMustExist
CommonDialog1.FileName = Trim(Adodc1.Recordset.Fields("貨物名稱")) & ""
CommonDialog1.Filter = "圖片檔案 (.JPEG)|*.jpg"
CommonDialog1.Flags = cdlOFNNoLongNames
CommonDialog1.Flags = cdlOFNOverwritePrompt
CommonDialog1.CancelError = True
CommonDialog1.CancelError = True
On Error GoTo line1
CommonDialog1.ShowSave
Call 自動檢查檔案夾
Inet1.URL = "192.168.0.109"
Inet1.Protocol = icFTP
Inet1.UserName = "用戶名"
Inet1.Password = "密碼"
Inet1.Execute "", "get /圖片資源/" & Adodc1.Recordset.Fields("序號") & ".jpg c:\臨時檔案夾\1.jpg"
Label12.Caption = "正在下載,請稍候……"
Frame5.Visible = True
Do While Inet1.StillExecuting
DoEvents
Loop
Frame5.Visible = False
Inet1.Execute , "QUIT"
str1 = "c:\臨時檔案夾\1.jpg"
str2 = CommonDialog1.FileName
If Dir(str2) <> "" Then
Kill str2
End If
FileCopy str1, str2
Kill str1
MsgBox "下載完畢!", vbInformation + vbOKOnly, "提示"
給你一個例子,參考一下
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/115415.html
標籤:網絡編程
上一篇:哪位高手可以教教我
