Visual Basic Codes
ActiveX
Miscellaneous
Applications
Code Snippets
Common Dialogs
Special Effects
Database Stuff
Date Time
Files Drives
Forms
Graphics Games
Internet Stuff
Multimedia
Other
Strings
Windows
Visual Basic > Code Snippets sample source codes
Capture desktop window
Capture desktop window Private Const SRCCOPY = &HCC0020 Private Const BLACKNESS = &H42 Private Const SRCERASE = &H440328 Private Const SRCINVERT = &H660046 Private Const SRCPAINT = &HEE0086 Private Const WHITENESS = &HFF0062 Private Const DSTINVERT = &H550009 Private Const MERGECOPY = &HC000CA Private Const MERGEPAINT = &HBB0226 Private Const NOTSRCCOPY = &H330008 Private Const NOTSRCERASE = &H1100A6 Private Const PATCOPY = &HF00021 Private Const PATINVERT = &H5A0049 Private Const PATPAINT = &HFB0A09 Private Const SRCAND = &H8800C6 Private Declare Function GetDesktopWindow Lib "user32" () As Long Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC 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 dwRop As Long) As Long Private Sub Form_Load() Dim dwnd As Long, wndc As Long Form1.AutoRedraw = True dwnd = GetDesktopWindow() wndc = GetDC(dwnd) BitBlt Me.hdc, 0, 0, Screen.Width, Screen.Height, wndc, 0, 0, SRCCOPY End Sub
Privacy Policy
|
Link to Us
|
Links