12-15-2023, 10:28 PM
(12-15-2023, 09:11 PM)TerryRitchie Wrote: One method I came up with was using _CLIPBOARDIMAGE to "poison the well" so to speak. Any program I write would need to write garbage to the clipboard periodically like the example belowThis could also work under Windows.
Code: (Select All)'Poison the well
image = _NEWIMAGE(100, 100, 32)
_DEST image
PRINT " NO!"
_DEST 0
DO
SLEEP 1
_CLIPBOARDIMAGE = image
LOOP UNTIL INKEY$ <> ""
SYSTEM
Code: (Select All)
SCREEN _NEWIMAGE(800, 600, 32)
DO
CLS
COLOR _RGB32(177, 177, 177)
PRINT "Monitoring clipboard..."
IF img& < -1 THEN _FREEIMAGE img&
img& = _CLIPBOARDIMAGE
IF img& < -1 THEN
Shell "cmd /c echo off | clip"
END IF
_DISPLAY
_LIMIT 10
LOOP
But starting with Win 10, the clipboard can store more than one page.