dear all
the following is the code what i got it from the discussion forum,
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)
keybdevent vbKeyMenu, 0, 0, 0
keybdevent vbKeySnapshot, 0, 0, 0
DoEvents
keybdevent vbKeySnapshot, 0, KEYEVENTFKEYUP, 0
keybdevent vbKeyMenu, 0, KEYEVENTFKEYUP, 0
DoEvents
Set SaveFormPic = Clipboard.GetData(vbCFBitmap)
Clipboard.SetData pic, vbCFBitmap
End Function
Private Sub Command1_Click()
SavePicture SaveFormPic, "C:\MyPic.jpg" 'picture location
End Sub
but i would like to save any one form, but it only save several forms together. how to save any one form automatically what i want? i just call this function and save one form what i want. thanks. urgent.
!--removed tag-->
Enter your message below
Sign in or Join us (it's free).