以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]请问如何将粘贴板上的图片插入单元格内  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=83476)

--  作者:wendude
--  发布时间:2016/4/10 12:24:00
--  [求助]请问如何将粘贴板上的图片插入单元格内
将粘贴板上图片直接插入当前的单元格内,谢谢
--  作者:Hyphen
--  发布时间:2016/4/10 15:45:00
--  


--  作者:wendude
--  发布时间:2016/4/10 16:00:00
--  额,试了一下有报错了
提示错误“GDI+中发生一般性错误”
--  作者:Hyphen
--  发布时间:2016/4/10 16:18:00
--  
Dim img = Clipboard.GetImage()
If img IsNot Nothing Then
    img.Save(ProjectPath & "Attachments\\图片1.jpg")
    CurrentTable.Current(CurrentTable.ColSel) = "图片1.jpg"
End If

--  作者:Hyphen
--  发布时间:2016/4/10 16:19:00
--  
http://www.foxtable.com/help/topics/2069.htm
--  作者:大红袍
--  发布时间:2016/4/10 22:30:00
--  
Dim img = Clipboard.GetImage()
If img IsNot Nothing Then
    Dim path As String = ProjectPath & "Attachments/"
    If FileSys.DirectoryExists(path) = False Then
        FileSys.CreateDirectory(path)
    End If
    img.Save(path & "图片1.jpg")
    CurrentTable.Current(CurrentTable.ColSel) = "图片1.jpg"
    msgbox("保存成功")
End If