$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
CONST SRCCOPY = &HCC0020
CONST SRCPAINT = &HEE0086
CONST SRCAND = &H8800C6
CONST SRCINVERT = &H6600460
CONST SRCERASE = &H1100A6
CONST NOTSRCCOPY = &H330008
CONST NOTSRCERASE = &H1100A6
CONST MERGECOPY = &HC000CA
CONST MERGEPAINT = &HBB0226
CONST PATCOPY = &HF00021
CONST PATPAINT = &HFB0009
CONST PATINVERT = &H5A0049
CONST DSTINVERT = &H550009
CONST BLACKNESS = &H000042
CONST WHITENESS = &HFF0062
DECLARE FUNCTION SetActiveWindow LIB "USER32" ALIAS "SetActiveWindow" (hWnd AS INTEGER) AS INTEGER
DECLARE FUNCTION GetDC LIB "USER32" ALIAS "GetDC" (hWnd AS INTEGER) AS INTEGER
DECLARE FUNCTION ReleaseDC LIB "USER32" ALIAS "ReleaseDC" (hWnd AS INTEGER, hDC AS INTEGER) AS INTEGER
DECLARE FUNCTION BitBlt LIB "GDI32" ALIAS "BitBlt" _
(BYREF hDC AS INTEGER, nXDest AS INTEGER, nYDest AS INTEGER, _
nWidth AS INTEGER, nHeight AS INTEGER, hdcSrc AS INTEGER, _
nXSrc AS INTEGER, nYSrc AS INTEGER, dwRop AS INTEGER) AS INTEGER
DIM DC AS INTEGER
DIM Bitmap AS QBITMAP
Bitmap.Width = Screen.Width
Bitmap.Height = Screen.Height
Bitmap.PixelFormat = pf24bit
SetActiveWindow(0)
DC = GetDC(0)
BitBlt(Bitmap.Handle, 0, 0, Screen.Width, Screen.Height, DC, 0, 0, SrcCopy)
ReleaseDC(0,DC)
Bitmap.SaveToFile("CAPTURE.BMP")
CREATE Form AS QFORM
CAPTION = "Saved as CAPTURE.BMP"
CREATE Image AS QIMAGE
AutoSize = 1
BMP = Bitmap.BMP
END CREATE
Center
SHOWMODAL
END CREATE
$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
$INCLUDE "Win32api.inc"
DIM DC AS INTEGER
DIM Bitma AS QBITMAP
Bitma.Width = Screen.Width
Bitma.Height = Screen.Height
Bitma.PixelFormat = pf24bit
SetActiveWindow(0)
DC = GetDC(0)
BitBlt(Bitma.Handle, 0, 0, Screen.Width, Screen.Height, DC, 0, 0, SrcCopy)
ReleaseDC(0,DC)
Bitma.SaveToFile("CAPTURE.BMP")
CREATE Form AS QFORM
CAPTION = "Saved as CAPTURE.BMP"
CREATE Image AS QIMAGE
AutoSize = 1
BMP = Bitma.BMP
END CREATE
Center
SHOWMODAL
END CREATE
|