Microsoft KB Archive/35241

= Using Dual Video Display Cards and Monitors with QuickBasic =

Article ID: 35241

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q35241



SUMMARY
QuickBasic allows limited use of two video-display system cards within the same application if the host computer has both a color video card and monitor, plus a monochrome card and monitor. Only the default display (the one that was active when QuickBasic was invoked) has a cursor and graphics capability.

The method requires OPENing &quot;CONS:&quot; FOR OUTPUT AS #n, POKEing the video-mode specifier of the desired output screen into memory location 449 hex, then using a PRINT #n to display text on the desired output monitor. It is important to use &quot;CONS:&quot;, not &quot;SCRN:&quot; in the OPEN statement. &quot;SCRN:&quot; is always associated with the default display.

This information applies to Microsoft QuickBasic versions 4.0, 4.0b, and 4.5; to Microsoft Basic Compiler versions 6.0 and 6.0b for MS-DOS; and to Microsoft Basic PDS version 7.0 for MS-DOS.



MORE INFORMATION
There is no practical way to put graphics images on the secondary display in QuickBasic. See pages 54 and 55 of the first edition of &quot;The Peter Norton Programmer's Guide to the IBM PC&quot; (published by Microsoft Press, 1985) or page 58 of the second edition (1988) for a list of settings for the video mode. The following code example, which uses 7 (for a monochrome adapter) and 3 (for 80-column text, 16 colors), works with a computer that has a Hercules-compatible monochrome adapter and an EGA color display: OPEN &quot;cons:&quot; FOR OUTPUT AS #1 DEF SEG = 0 PRINT #1, &quot;This should be on the DEFAULT Screen.&quot; POKE &H449, 7 PRINT #1, &quot;This should be on the MONO Screen.&quot; POKE &H449, 3 PRINT #1, &quot;This should be on the COLOR Screen.&quot;

Additional query words: QuickBas BasicCom 6.00 6.00b 7.00

Keywords: KB35241

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.