Microsoft KB Archive/35153
Article ID: 35153
Article Last Modified on 11/21/2006
- Microsoft QuickBasic 2.0
- Microsoft QuickBasic 2.01
- Microsoft QuickBasic 3.0
- Microsoft QuickBasic 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft BASIC Compiler 6.0
- Microsoft BASIC Compiler 6.0b
- Microsoft BASIC Professional Development System 7.0
- Microsoft GW-BASIC Interpreter 1.0
This article was previously published under Q35153
There is no way to display underlined characters in text mode (SCREEN 0) on a color display. Only an IBM Monochrome Display Adapter (MDA) or a Hercules Graphics Adapter (HGA) which is connected with a monochrome display device can display underlined characters in SCREEN 0. This is a result of the way that the video attributes are encoded in video memory and is a limitation of the hardware, not Basic.
Note that in graphics mode, you may draw lines wherever desired, and you can emulate the monochrome underlining capability.
This information applies to the following products:
- Microsoft QuickBasic Compiler Versions 2.00, 2.01, 3.00, 4.00, and 4.00b
- Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2 and Microsoft Basic PDS Version 7.00 for MS-DOS and MS OS/2
- The Microsoft GW-Basic Interpreter Versions 3.20, 3.22, and later (Note that on Hercules or monochrome adapters, GW-Basic can use text SCREEN 0 but does not support graphics screen modes.)
See Pages 79-81 of "The Peter Norton Programmer's Guide to the IBM PC" (published by Microsoft Press, 1985) for more information about text mode attributes.
The following book from Microsoft Press describes video details more completely:
"Programmer's Guide to PC & PS/2 Video Systems," by Richard Wilton (Microsoft Press, 1987). Chapter 3 describes the alphanumeric video modes (i.e., SCREEN 0).
Additional query words: QuickBas BasicCom