Screen Capturing Routines
You can use it to capture a passed in VB Form or any window with a specified HWND. For example, you could use the GetDeskTopWindow to get the Desk Top HWND and then capture the whole desktop to a VB Picture Object.
Perhaps the best thing about these routines are that they return a standard VB Picture Object. That means that you can incorporate screen capturing routines for many different purposes (and save them to disk with the SavePicture vb statement) - for instance, if your program raises an error, you can capture the screen in your error handling routine and then save it to disk / database / whatever ! - You could even email the saved picture straight to the relevant developer.
Example usage :
'
set Picture1.Picture = CaptureForm(me)
PrintPicture Printer, Picture2.Picture
Printer.EndDoc
'
' or :
'
Dim oPic as StdPicture
set oPic = CaptureWindow(0, 0, 0, _
Screen.Width / Screen.TwipsPerPixelX, _
Screen.Height / Screen.TwipsPerPixelY)
'
SavePicture oPic.Picture, "c:\output.bmp"
'

Comments
Same program in SDK
Posted by pajaiswal on 09/05/2007 03:00amcan you tell the same program in SDK.
Replyscreen capturing
Posted by Legacy on 02/20/2004 12:00amOriginally posted by: Ramkisaur Prajapat
Replyurgent help needed
Posted by Legacy on 05/28/2003 12:00amOriginally posted by: Prakriti
THE ABOVE CODE WORKS WELL FOR CAPTURING THE SCREEN
IMAGE but i too
WANT TO SEND THE CAPTURED PICTURE (STDPICTURE OBJECT)
TO ANOTHER MACHINE WITHOUT SAVING IT AS A FILE
USING WINSOCK CONTROL IN VISUAL BASIC.
ANY IDEA ON THE ABOVE QUESTION.
PLEASE SEND TO ME IN THE EMAIL ADDRESS
Replyprakriti_s@yahoo.com
THIS WORKS WELL BUT I WANT SOMETHING MORE
Posted by Legacy on 06/04/2002 12:00amOriginally posted by: LIJU JOHN
THE ABOVE CODE WORKS WELL FOR CAPTURING THE SCREEN
IMAGE AND IT CAN SEEN IN OUR MACHINE.
I WANT TO SEND THE CAPTURED PICTURE (STDPICTURE OBJECT)
TO ANOTHER MACHINE WITHOUT SAVING IT AS A FILE
USING WINSOCK CONTROL IN VISUAL BASIC.
ANY IDEA ON THE ABOVE QUESTION.
PLEASE SEND TO ME IN THE EMAIL ADDRESS
ReplyLIJU_JOHN@YAHOO.COM
Creating images with text
Posted by Legacy on 05/17/2000 12:00amOriginally posted by: Kart
ReplySave option
Posted by Legacy on 01/31/2000 12:00amOriginally posted by: Alex
How can I reduce the colour depth of the bitmap before I save it? The idea is to reduce the size of the file. Or can I convert it to jpg?
ReplyThanx.