10-10-2023, 08:31 PM
You could use a function like this:
Code: (Select All)
CONST __REPORT = 0
CONST __KEEPBACKGROUND = 1
CONST __ONLYBACKGROUND = 2
CONST __FILLBACKGROUND = 3
SCREEN _NEWIMAGE(400, 300, 32)
dm = __PRINTMODE(__REPORT) ' or __PRINTMODE(0)
dummy = __PRINTMODE(__KEEPBACKGROUND) ' or __PRINTMODE(1)
PRINT "X"
dummy = __PRINTMODE(dm) ' restore previous print mode
FUNCTION __PRINTMODE (mode AS INTEGER)
SELECT CASE mode
CASE 0: __PRINTMODE = _PRINTMODE ' report current mode
CASE 1: _PRINTMODE _KEEPBACKGROUND ' set modes
CASE 2: _PRINTMODE _ONLYBACKGROUND
CASE 3: _PRINTMODE _FILLBACKGROUND
END SELECT
END FUNCTION