Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_printmode ???
#3
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
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
_printmode ??? - by James D Jarvis - 10-10-2023, 07:36 PM
RE: _printmode ??? - by TerryRitchie - 10-10-2023, 08:16 PM
RE: _printmode ??? - by TerryRitchie - 10-10-2023, 08:31 PM



Users browsing this thread: 2 Guest(s)