PRB: Use of Forms Will Disable Blinking Text

ID: Q90827


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


SYMPTOMS

If you display a form or a form-related object (such as a message box or input box), any blinking text will stop blinking.


CAUSE

This behavior occurs because forms and form-related objects use high intensity colored text, and you cannot have both high intesity and blinking text on the screen at the same time (a single bit is used in the character attribute byte to represent either blinking or high intesity, depending on the current video state). Additionally, Visual Basic for MS-DOS will not restore blinking text to its original state when the program ends.


STATUS

This behavior is by design.


MORE INFORMATION

In order to re-enable blinking text, you can issue an MS-DOS interrupt while there are no forms showing.

Example


' To try this example in VBDOS.EXE:
' 1. From the File menu, choose New Project.
' 2. Copy the code example into the Code window.
' 3. Press F5 to run the program.

' To run this example in the programming environment, you must invoke
' the environment with the /L option to load the default Quick library.
' For example, with Microsoft Visual Basic for MS-DOS, version 1.0:
'
'   VBDOS.EXE /L
'
' Use the following include file for Microsoft Visual Basic for MS-DOS
' version 1.0:
REM $INCLUDE: 'VBDOS.BI'
DIM inregs AS RegType, outregs AS RegType
CLS
COLOR 26,6                  ' Blinking green on red.
PRINT "Blinking Text"
SLEEP 1                     ' Pause.
screen.controlpanel(7) = 0  ' Preserve background color.
MSGBOX "Click OK."          ' Turns off blinking and changes colors.

' These statements restore colors and blinking.
inregs.ax = &H1003
inregs.bx = 1
CALL interrupt(&H10, inregs, outregs)
END 
This and other valuable information can be found in the README.TXT file that is installed with the product.

Additional query words: VBmsdos 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.