VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



MAke a ScreenShot Taker

by Spazlazy (2 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 19th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

MAke a ScreenShot Taker

API Declarations


Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long

Rate MAke a ScreenShot Taker



Dim wScreen As Long
Dim hScreen As Long
Dim w As Long
Dim h As Long
Picture1.Cls

wScreen = Screen.Width \ Screen.TwipsPerPixelX
hScreen = Screen.Height \ Screen.TwipsPerPixelY

Picture1.ScaleMode = vbPixels
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight


hdcScreen = GetDC(0)

r = StretchBlt(Picture1.hdc, 0, 0, w, h, hdcScreen, 0, 0, wScreen, hScreen, vbSrcCopy)

`End Sub

Download this snippet    Add to My Saved Code

MAke a ScreenShot Taker Comments

No comments have been posted about MAke a ScreenShot Taker. Why not be the first to post a comment about MAke a ScreenShot Taker.

Post your comment

Subject:
Message:
0/1000 characters