Microsoft KB Archive/58564

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 17:57, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Article ID: 58564

Article Last Modified on 11/21/2006

This article was previously published under Q58564

SYMPTOMS

When using the WIDTH 80,60 statement in SCREEN 12 of a Basic program, you must reset the palette or you cannot change attributes 8 through 15 of the 16-attribute palette.

The following code example demonstrates this problem when executed in Microsoft QuickBasic version 4.50 or Microsoft Basic Professional Development System (PDS) version 7.00 for MS-DOS.

STATUS

Microsoft has confirmed this to be a bug in Microsoft QuickBasic version 4.50 and in Microsoft Basic Professional Development System (PDS) version 7.00 for MS-DOS (buglist7.00). This problem was corrected in Basic PDS 7.10 (fixlist7.10).

To change the palette in the program, you must reset the palette using the PALETTE statement (with no arguments) after you use the WIDTH 80,60 statement.

MORE INFORMATION

This behavior in the above product versions differs from QuickBasic versions 4.00 and 4.00b and Microsoft Basic Compiler versions 6.00 and 6.00b, where you do not need to reset the palette after WIDTH 80,60.

Code Example

     SCREEN 12
     WIDTH 80, 60
     'PALETTE         'Remove the quote to make it work correctly.
     count = 0
     FOR y = 0 TO 375 STEP 25
        LINE (y + 2, y + 2)-(y + 25, y + 25), count, BF
        count = count + 1
     NEXT y
     FOR x = 1 TO 15
        PALETTE x, 63   ' Should change all boxes to same color.
     NEXT x
     END
                


Additional query words: QuickBas BasicCom buglist4.50 SR# S900201-95 B_BasicCom

Keywords: KB58564