www.3112.net > 在VB中怎样将PiCturEBox内显示的内容(包括里边的控件)保存为图片文件?

在VB中怎样将PiCturEBox内显示的内容(包括里边的控件)保存为图片文件?

Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As LongPrivate Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal

截屏任意位置并保存在剪贴板上Dim hdc1 As Long, hdc2 As Long, hbmp1 As Longhdc1 = CreateDC("DISPLAY", 0, 0, 0) '或 GetDC(0)hdc2 = CreateCompatibleDC(hdc1)hbmp1 = CreateCompatibleBitmap(hdc1, 600, 600)SelectObject hdc2,

调用SavePictrue

你好,你可以尝试一下 下面的vb截图代码:可以截取picture2控件的图片: 添加一个picture1,picture2 和一个command1.picture2中你可以任意放控件,都可以成功截取.保存为vb.BMP Private Declare Function GetDC Lib "user32" (ByVal

open txtFileName for output as #1write #1,picPathclose #1这样就OK了~~~txtFileName是txt路径,存在此文件则打开,不存在则创建picPath是图片路径

Picture1.AutoRedraw = True'必须设为 True ,这样才能图形和文本输出到屏幕,并存储在内存的图象中.然后可以使用 Image 属性 SavePicture Picture1.Image, "C:\Pic1.BMP"'此代码保存的是 Picture1 里使用 Line 、 Circle 、PaintPicture 等绘

用SavePicture,只能保存BMP格式.如果要保存已经画好的图片,SavePicture Picture1.Image, "C:\aaa.bmp"如果要保存图片框的Picture图片,SavePicture Picture1.Picture, "C:\aaa.bmp"

你先把Picture的AutoRedraw属性改为True,savepicture picture1.image,"c:/a.jpg"我忘记把前面那个东西给你设置了,已经把新的东西发给你了,请查收

如果在VB里操作,建议在数据库的某个字段里存放相关图片文件标识符. 而把图片文件保存在文件夹里,每当显示的时候,调用LoadPicture函数.

添加两个picture,以及两个command,一个作为预览,一个用于保存.然后是:priavte sub command1_click()'将picture1加载的图片作为预览到picture2Picture2.ScaleMode = 3 Picture2.AutoRedraw = True Picture2.PaintPicture Picture1.

相关搜索:

网站地图

All rights reserved Powered by www.3112.net

copyright ©right 2010-2021。
www.3112.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com