Foxtable(狐表)用户栏目专家坐堂 → [求助]如何实现截图的效果(已解决)


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

主题:[求助]如何实现截图的效果(已解决)

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


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/6/7 14:37:00 [显示全部帖子]

 

Dim pbx1 As WinForm.PictureBox = Forms("窗口1").Controls("PictureBox1")
Dim pbx2 As WinForm.PictureBox = Forms("窗口1").Controls("PictureBox2")
Dim img = pbx1.image
Dim bl1 As Double = img.width / pbx1.width
Dim Top As Double = (pbx1.height - img.height / bl1) / 2
Dim bmp As new bitmap(cint(kxs*bl1), cint(gxs*bl1))
Dim g = graphics.fromimage(bmp)
Dim x As Integer = xzzb*bl1
Dim y As Integer = (yzzb-Top)*bl1
Dim w As Integer = bmp.width
Dim h As Integer = bmp.height
g.DrawImage(img, new Rectangle(0, 0, w, h), new Rectangle(x, y, w, h), GraphicsUnit.Pixel)

pbx2.image = bmp

bmp.save(ProjectPath & "B\" & Tables("照片").Current("原图"))


 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/6/7 15:59:00 [显示全部帖子]


 回到顶部