Here is a function to take screenshots in the bitmap file format. This was like my fourth review and so far it appears to be working.
It works with DB Pro but have not tried it with DB Classic.
Any questions let me know.
FUNCTION TakeScreenShot()
iX = SCREEN WIDTH()
iY = SCREEN HEIGHT()
X = SCREEN WIDTH()
Y = SCREEN HEIGHT()
SSNumber = 0
DO
SSNum$ = STR$(SSNumber)
ScreenName$ = "Screenshots\Screen" + SSNum$ + ".bmp"
OPEN TO WRITE 1, ScreenName$
` check to see if file already exist
` if the file does not exist create it
IF NOT FILE EXIST(ScreenName$)
ImageSize = (iX * iY)
FileSize = (size * 3) + 54
` bitmap file header
WRITE WORD 1, 0x4D42
WRITE LONG 1, FileSize
WRITE LONG 1, 0
WRITE LONG 1, 54
` bitmap info header
WRITE LONG 1, 40
WRITE LONG 1, X
WRITE LONG 1, Y
WRITE WORD 1, 1
WRITE WORD 1, 16
WRITE LONG 1, 0
WRITE LONG 1, ImageSize
WRITE LONG 1, X
WRITE LONG 1, Y
WRITE LONG 1, ((256*256)*256)
WRITE LONG 1, ((256*256)*256)
LOCK PIXELS
` create the bitmap
FOR height = SCREEN HEIGHT()-1 TO 0 STEP -1
FOR width = 0 TO SCREEN WIDTH()-1 STEP 1
WRITE BYTE 1, RGBB(POINT(width, height))
WRITE BYTE 1, RGBG(POINT(width, height))
WRITE BYTE 1, RGBR(POINT(width, height))
NEXT width
NEXT height
UNLOCK PIXELS
CLOSE FILE 1
EXIT
ELSE
INC SSNumber
ENDIF
LOOP
ENDFUNCTION