Microsoft KB Archive/33044

= PEN(5) Function in SCREEN 9 Returns Only 0 or 1 with Mouse =

Article ID: 33044

Article Last Modified on 11/21/2006



This article was previously published under Q33044



SYMPTOMS
The PEN(5) function returns only a value of 0 or 1 instead of the actual y pixel coordinate when using the Microsoft Mouse in SCREEN 9, 10, 11, or 12 (which are screen modes with resolutions of 640 x 350 or greater). This problem occurs both inside the QB.EXE environment and as a compiled .EXE program.



STATUS
Microsoft has confirmed this to be a bug in Microsoft QuickBasic Versions 3.00, 4.00, 4.00b, and 4.50, in Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS, and in Microsoft Basic PDS Version 7.00 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
The problem does not occur in SCREENs 1, 2, 7, 8, or 13, which have resolutions lower than 640 x 350.

The following program hangs the machine in QuickBasic 4.00: SCREEN 9 CLS PEN ON true = -1 WHILE true x = PEN(4)        'x pixel coordinate y = PEN(5)        'y pixel coordinate PRINT &quot;X= &quot;x, &quot;Y= &quot;y WEND

Additional query words: QuickBas BasicCom buglist3.00 buglist4.00 buglist4.00b buglist4.50 B_BasicCom buglist6.00 buglist6.00b buglist7.00

Keywords: KB33044

-

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

© Microsoft Corporation. All rights reserved.