以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [分享][原创]列截图功能(解决)谢谢老师们 最后的代码有效 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=88567) |
-- 作者:大红袍 -- 发布时间:2016/8/5 10:06:00 -- CellButtonClick事件
If e.Col.name = "截图功能" Then |
-- 作者:大红袍 -- 发布时间:2016/8/5 14:57:00 -- If e.Col.name = "图片" Then 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("项目") & "\\" & "报价配图" & "\\"& Format( date.Today,"yyyy-MM-dd") & "/" & e.Row("产品名") & e.Row("工艺用材说明") & ".jpg" Dim path As String = e.Col.DataCol.DefaultFolder If path = "" Then path = ProjectPath & "Attachments/" End If 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 End If e.cancel = True End If |