Guy's
I'm looking to Save the contain and the displaed image of Picture.1 to c:\image.jpg
like the below attached image exampl :
can any one help me in the code of that ..
Thanks .. :wave:
Printable View
Guy's
I'm looking to Save the contain and the displaed image of Picture.1 to c:\image.jpg
like the below attached image exampl :
can any one help me in the code of that ..
Thanks .. :wave:
this wil save as bmp file, u cant save it as jpg format, even though u set the name as .jpg, the format wil be bmp, u need some converting codes to convert as jpg.
Code:SavePicture Picture1.Image, "c:\image1.bmp"
Thanks.. What about the print screen of the form it self.. I want to get print screen for the form it self
Pls help me how can I do it .. ?!
just like this,
edited: i posted the form print code, but i think u asked to save form as image, if yes then try this, and this is not my own code but works fine.Code:Private Sub Command1_Click()
PrintForm
End Sub
Code:Option Explicit
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2
Private Function SaveFormPic() As Picture
Dim pic As StdPicture
Set pic = Clipboard.GetData(vbCFBitmap)
keybd_event vbKeyMenu, 0, 0, 0
keybd_event vbKeySnapshot, 0, 0, 0
DoEvents
keybd_event vbKeySnapshot, 0, KEYEVENTF_KEYUP, 0
keybd_event vbKeyMenu, 0, KEYEVENTF_KEYUP, 0
DoEvents
Set SaveFormPic = Clipboard.GetData(vbCFBitmap)
Clipboard.SetData pic, vbCFBitmap
End Function
Private Sub Command1_Click()
SavePicture SaveFormPic, "C:\image1.bmp" 'picture location
End Sub