编写代码实现->截图->保存为文件->上传
截图、保存
Dim proc As new Process
proc.File = ApplicationPath & "capture.exe"
proc.WaitForClose = True
proc.Start
If ClipBoard.GetImage IsNot Nothing Then
ClipBoard.GetImage.save("d:\test.jpg")
msgbox("保存到了d盘")
ClipBoard.SetText("d:\test.jpg")
End If
上传、填写到表格
Dim ftp1 As New FtpClient
ftp1.Host="196.128.143.28"
ftp1.Account = "foxuser"
ftp1.Password = "138238110"
If ftp1.Upload("d:\test.jpg","/test.jpg") = True Then
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Dim r As Row = Tables("表A").current
Dim ls = r.DataRow.Lines("图片")
ls.add("/test.jpg")
r.DataRow.Lines("图片")= ls
Else
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
以上代码转自有点甜老师
[此贴子已经被作者于2020/12/9 9:54:06编辑过]