Use PRINT# to MS-DOS "CON" Device to Send ANSI Escape Codes (31157)
The information in this article applies to:
- Microsoft GW-BASIC 3.2
- Microsoft GW-BASIC 3.22
- Microsoft GW-BASIC 3.23
- 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
- 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 QuickBASIC 1.0
- Microsoft QuickBASIC 1.01
- Microsoft QuickBASIC 1.02
- Microsoft QuickBASIC 1.0a
- Microsoft QuickBASIC 1.0b
- Microsoft QuickBASIC 2.0
- Microsoft QuickBASIC 2.01
- Microsoft QuickBASIC 3.0
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
This article was previously published under Q31157 SUMMARY
Sending ANSI escape codes to the screen with the PRINT statement will
not perform ANSI screen control because the PRINT statement (in the
products below) circumvents DOS and its device drivers.
To make ANSI escape sequences work properly, you must OPEN the DOS
"CON" or "CONS:" (console) device instead, and use PRINT# for output.
This information applies to the following products:
- QuickBasic Versions 1.00, 1.01, 1.02, 2.00, 2.01, 3.00, 4.00,
4.00b, and 4.50 for IBM Personal Computers and Compatibles
- Microsoft Basic Compiler Version 6.00 and 6.00b for MS-DOS
- Microsoft Basic PDS Version 7.00 for MS-DOS and MS OS/2
- GW-Basic Versions 3.20, 3.21, 3.22, 3.23
- IBM and Compaq versions of BasicA
Modification Type: | Minor | Last Reviewed: | 1/9/2003 |
---|
Keywords: | KB31157 |
---|
|