Help and Support
 

powered byLive Search

Background COLOR Set in Graphics Mode Affects SHELL Background

Article ID:75518
Last Review:August 16, 2005
Revision:2.1
This article was previously published under Q75518

SYMPTOMS

If you perform a Basic SCREEN statement to switch to a SCREEN mode other than SCREEN 0, then change the background color using the Basic COLOR statement, and then SHELL to DOS (using either the Basic SHELL statement or the Shell command from the QB.EXE or QBX.EXE File menu), the background color for the DOS shell will incorrectly be the same as that set in Basic instead of the default DOS background color.

To work around this problem, you can use the DOS CLS command within the shell to correctly reset the default DOS background color.

Back to the top

STATUS

Microsoft has confirmed this to be a bug in Microsoft Basic Professional Development System (PDS) versions 7.0 and 7.1 (buglist7.00, buglist7.10) for MS-DOS and Microsoft QuickBasic version 4.5 (buglist4.50) for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Back to the top

MORE INFORMATION

If you have the ANSI.SYS screen driver loaded (using DEVICE=ANSI.SYS in your DOS CONFIG.SYS file), you may not be able to reset the DOS shell background color using the DOS CLS command within the shell. With ANSI.SYS loaded, you may need to use a DOS MODE command, such as MODE CO80, to reset the default colors for the shell. The MODE command is required for the ANSI.SYS provided with MS-DOS 5.0.

The following is an example that reproduces the problem:
    SCREEN 9      'screen other than 0
    COLOR 4,7     'sets colors to red on white
    PRINT "You are in a Shell"
				
If you run this program with a SHELL statement added at the end (to invoke the DOS command line), or if after running the program you choose the Shell command from the File menu in the QB.EXE or QBX.EXE environment, you will see a white screen with the message "You are in a Shell" in red at the top of the screen. The default background color from the COLOR statement has incorrectly been carried over to the DOS shell, so the background color is white. If your normal default foreground color for your DOS prompt is white, you will not be able to see the DOS prompt or any DOS commands you enter, because they will be white on white. You can type CLS (or MODE CO80 if you have ANSI.SYS loaded) to reset the shell's colors to the normal DOS default.

Back to the top


APPLIES TO
Microsoft QuickBasic 4.5 for MS-DOS
Microsoft BASIC Professional Development System 7.0
Microsoft BASIC Professional Development System 7.1

Back to the top

Keywords: 
KB75518

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.