Search Tools Links Login


Takes a screenshot of the screen using the Windows API. The subroutine ScreenShot takes a screenshot of the entire screen, the subroutine PartialScreenShot takes a screenshot of only part of the screen.

Original Author: Steven Ayre


Both subroutines require the DC of the destination for the image - e.g. Form1.hDC Picture1.hDC
In addition, the PartialScreenShot subroutine needs the Top, Left, Width, Height parameters which define an area of the screen to take a screenshot of.


The API call which takes the screenshot is BitBlt. This takes the image on one object and puts it on another object, using the objects' DCs to uniquely identify each object. The other two API calls are used to get the DC of the entire screen. The DC of the object that you are putting the image on can be found from its .hDC property (if it has one).


None, but puts an image on the object which has its hDC passed to one of the subroutines.

Side Effects

None! (afaik)

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 74 times


Visual Basic 6

Posted: 9/3/2020 3:45:00 PM
Size: 3,364 bytes

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.