VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Capturing the Screen

TK  (1 Submission)   Custom Controls/Forms/Menus   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Capture a screen in a window, this one actually works...

Inputs
'Inputs: None

Assumes
You need to create a form, add 2 menu items, item1 and item2, then add 2 picture boxs one named piccover and one named picfinal, make them the same size, and lay them right on top of each other... the size of them is the size of the screen captured... so if you want a 1024x768 screen captured be sure to size the picture boxes as big as you can.. The two menu items you can call whatever you like.. Capture screen for the first, and Clear window for the second if you like...

API Declarations
'Make these one line, this window isn't big enough
Private Declare Function GetDC% Lib "USER32" (ByVal HWnd%)
Private Declare Function ReleaseDC% Lib "USER32" (ByVal HWnd%, ByVal HDC%)
Private Declare Function GetDesktopWindow% Lib "USER32" ()
Private Declare Function BitBlt% Lib "GDI32" (ByVal DestDC%, ByVal X%, ByVal Y%, ByVal W%, ByVal H%, ByVal SrcHDC%, ByVal SrcX%, ByVal SrcY%, ByVal Rop&)
Private Declare Function DeleteDC Lib "GDI32" (ByVal HDC As Long) As Long
Const SRCCOPY = &HCC0020

Rate Capturing the Screen (2(2 Vote))
Capturing the Screen.bas

Capturing the Screen Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters