在vb中自己做了个画图程序,图片是画在picture控件上的,请问如何保存图片为.jpg或其它格式。

来源:百度知道 编辑:UC知道 时间:2024/05/25 22:15:19
在vb中自己做了个画图程序,图片是画在picture控件上的,请问如何保存画好的图片。
图片保存的格式为。jpg或其它格式?请详细回答。
有高分!
要有代码!!!!!!!
一楼的不行啊

savepicture picture1.picture,"c:\a.bmp"
不可能不行的,VB6测试通过了
先把Picture1.autoredraw设成true

以下代码是BAIDU某网友在BAIDU贴出的代码:
Option Explicit
Private Const BI_RGB = 0&
Private Const DIB_RGB_COLORS = 0 ' color table in RGBs
Private Const BITMAPTYPE = &H4D42
Private Const INVALID_HANDLE_VALUE = (-1)
Private Const GENERIC_WRITE = &H40000000
Private Const CREATE_ALWAYS = 2
Private Const FILE_ATTRIBUTE_NORMAL = &H80
Private Type BITMAPINFOHEADER '40 bytes
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End Type
Private Type RGBQUAD
rgbBlue As Byte