Dim ftp1 As new ftpclient
ftp1.host="196.168.38.198"
ftp1.Account = "anyone"
ftp1.password = "0000"
ftp1.OpenManager
----------------------------
Dim dr As DataRow
dr = DataTables("款号登记").SQLFind("款号 = '" & Tables("销售订单_table2").current("款号") & "'")
If Forms("销售订单款式图片").Opened AndAlso dr IsNot Nothing AndAlso dr.isnull("款式图") = False Then '如果窗口已经打开
Dim name As String = projectpath & "RemoteFiles\" & dr("款式图")
If FileSys.FileExists(name) = False Then name = "E:\images" & dr("款式图")
If FileSys.FileExists(name) = False Then
Dim ftp1 As new ftpclient
ftp1.host="192.168.38.198"
ftp1.Account = "anyone"
ftp1.password = "0000"
If ftp1.Download(dr("款式图"),name) = False Then
Messagebox.show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
End If
Dim pbx As WinForm.PictureBox = Forms("销售订单款式图片").Controls("PictureBox1")
pbx.Image = getimage(name)
End If