If e.Col.name = "图片" Then
baseMainForm.WindowState= Windows.forms.FormWindowState.Minimized
ClipBoard.Clear
Dim proc As new Process
proc.File = ApplicationPath & "/capture.exe"
proc.WaitForClose = True
proc.Start
If ClipBoard.GetImage IsNot Nothing Then
Dim f As String = e.Row("客户名称") & "\" & e.Row("楼层")& "\" & "3.报价配图" & "\" & Format( Date.Today,"yyyy-MM-dd") & "\"& e.Row("产品名") &"-" & e.Row("产品号")&".png"
Dim path As String = e.Col.DataCol.DefaultFolder
If path = "" Then
path = Vars("IPM")
End If
basemainform.WindowState = 2
Dim dir As String = FileSys.GetParentPath(path & "/" & f)
If FileSys.DirectoryExists(dir) = False Then FileSys.CreateDirectory(dir)
ClipBoard.GetImage.save(path & "/" & f)
e.Row(e.Col.name) = f
Dim ftp1 As New FtpClient
ftp1.Host="196.128.143.28"
ftp1.Account = "foxuser"
ftp1.Password = "138238110"
If ftp1.Upload(path & "/" & f,f) = True Then
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If
e.cancel = True
Tables("订单总表.订单明细").Current.Save() '保存文件的行
End If
[此贴子已经被作者于2017/12/8 22:10:01编辑过]