How to Trap PRINT SCREEN Key on an Extended (101-Key) Keyboard (59133)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
This article was previously published under Q59133 SUMMARY
You can detect (trap) the PRINT SCREEN (or SHIFT+PRINT SCREEN, or PRT
SCR, and so on) key using the ON KEY GOSUB statement. This technique
does not work under Microsoft Windows, and may not work reliably on
all computers (it depends upon the type of ROM BIOS).
Although Basic can detect the key press with the ON KEY GOSUB
statement, the PRINT SCREEN action is controlled through the ROM BIOS
interrupt table, and cannot be disabled directly with Basic. To
disable the print screen utility, the interrupt vector must be
remapped with a C or assembly routine.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB59133 |
---|
|