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 "border" and the variable "pat" may be either an integer or a character string. If "pat" is an integer, the fill is done with a solid color. But if "pat" is a string value, it represents a fill pattern.
A string value for "pat" 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 "Illegal function call" error when "pat" 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 = "cc3c0c00" 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