Foxtable(狐表)用户栏目专家坐堂 → 项目中的表的截图问题


  共有2518人关注过本帖树形打印复制链接

主题:项目中的表的截图问题

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107896 积分:548849 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/1 23:08:00 [显示全部帖子]

Dim t = Tables("表A").grid
Dim point As Point = t.parent.pointtoscreen(t.Bounds.Location)
Dim myGraphics As Graphics = basemainform.CreateGraphics()
Dim s As new Size(t.width, t.height) '截取的大小
Dim bit As New Bitmap(s.Width, s.Height, myGraphics)
Dim memoryGraphics As Graphics = Graphics.FromImage(bit)
memoryGraphics.CopyFromScreen(point.x, point.y, 0, 0, s) '截取的开始位置,坐标(100, 200)
bit.save("d:\test.jpg")
memoryGraphics.dispose
myGraphics.dispose
bit.dispose

 回到顶部