vb6.0 如何用command将picturebox里的储存成图片

2024-11-06 13:31:39
推荐回答(3个)
回答1:

添加两个picture,以及两个command,一个作为预览,一个用于保存。
然后是:priavte sub command1_click()'将picture1加载的图片作为预览到picture2
Picture2.ScaleMode = 3
Picture2.AutoRedraw = True
Picture2.PaintPicture Picture1.Image, 0, 0, Picture2.ScaleWidth, Picture2.ScaleHeight, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight
end sub
'Picture2.Image 即你需要的内容:

然后 private sub command2_click()'将picture2图片保存到c:test.bmp
SavePicture Picture2.Image, "C:\test.bmp"
end sub

回答2:

Call VB.SavePicture(Picture1.Picture, "D:\1.jpg")

回答3:

savepicture