Blank Screen In Monochrome Mode

ID: Q94663


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for MS-DOS, version 1.0


SYMPTOMS

Some older VGA monochrome monitors or color monitors in monochrome mode blank the screen or do not perform screen output with the Print statement. This happens in the VBDOS.EXE interpreter environment and programs compiled using BC.EXE.

The problem occurs because, on startup, Microsoft Visual Basic for MS-DOS makes an invalid assumption that you have a color video system and sets the video mode appropriately. To work around this problem, you can call the BIOS interrupt 10h with function 0h to set the current video mode to monochrome.


STATUS

Microsoft has confirmed this to be a bug in the Standard and Professional Editions of Microsoft Visual Basic version 1.0 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

Normally, when running on a monochrome system, Microsoft Visual Basic for MS-DOS sets the current video setting to 7, which is monochrome mode. The actual video mode is different from Basic's video mode which can be set using the SCREEN statement. On certain hardware and under certain conditions, Visual Basic does not set the video mode to the correct setting of 7, but sets the configuration to 3 -- a color video mode. This causes problems when printing output to the screen.

To work around this problem, call the BIOS interrupt 10h with function 0h. Be cautious, however, because using this interrupt on a system that is already in color mode causes the output to be black or the screen to be blank. For more information on how to get the current video mode, query on the following words in the Microsoft Knowledge Base:

get and current and screen and video and mode and interrupt
The following Basic program changes the current video mode to 7.

Rem $INCLUDE: 'vbdos.bi'   ' defines for Call Interrupt
Dim inregs As regtype
Dim outregs As regtype
inregs.ax = &H7            ' BIOS interrupt to set video mode
Call Interrupt(&H10, inregs, outregs)
End 
If you run the program within the Microsoft Visual Basic for MS-DOS (VBDOS.EXE) editor, the default Quick library VBDOS.QLB must be loaded as follows:

   VBDOS /L 

Additional query words: VBmsdos BasicCom buglist1.00 1.00

Keywords :
Version : MS-DOS:1.0
Platform : MS-DOS
Issue type :


Last Reviewed: December 10, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.