Microsoft KB Archive/38273

= PAINT Must Not Use Fixed-Length String Patterns =

Article ID: 38273

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1
 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b

-



This article was previously published under Q38273



SUMMARY
The following command can be used to fill in an enclosed polygon: PAINT (x,y), pat, border In this case, x and y represent screen coordinates inside the polygon; the figure is drawn in a color specified by &quot;border&quot; and the variable &quot;pat&quot; may be either an integer or a character string. If &quot;pat&quot; is an integer, the fill is done with a solid color. But if &quot;pat&quot; is a string value, it represents a fill pattern.

A string value for &quot;pat&quot; works correctly in the QB.EXE environment whether the string value is a fixed-length string or a variable-length string. However, the compiled .EXE version of such a program produces an &quot;Illegal function call&quot; error when &quot;pat&quot; is a fixed-length string.

This design limitation applies to QuickBasic Versions 4.00, 4.00b, and 4.50, to Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2, and to Microsoft Basic PDS Version 7.00 for MS-DOS and MS OS/2.



MORE INFORMATION
Note: Fixed-length strings are not implemented in earlier versions of these products.

The following is a code example: DIM SHARED pat AS STRING * 16

pat = &quot;cc3c0c00&quot; SCREEN 9 WINDOW (0, 0)-(1250, 1000) COLOR 1, 0 CIRCLE (600, 200), 150 COLOR 3, 0 PAINT (600, 200), pat, 1 INPUT a$

Additional query words: QuickBas BasicCom

Keywords: KB38273

-

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

© Microsoft Corporation. All rights reserved.