See Also Example
Applies To
Form, picture box
Description
Determines the color used to fill in shapes; also used to fill in circles and boxes created with the Circle
Usage
{ [form.][control.]|Printer.}FillColor[ = color ]
Setting
The FillColor property settings are:
Setting Description
Normal RGB colors Colors set with the RGB or QBColor functions in code.
System default colors Colors specified with the system color constants from CONSTANT.TXT, a Visual Basic file that you can load into a module. The Windows environment substitutes the user's choices, as specified through the user's Control Panel settings.
By default, FillColor is set to 0 (black).
Remarks
When the FillStyle
Data Type
Long
Help:
BackColor, ForeColor Properties
FillStyle Property
Programmer's Guide:
Chapter 15, "Creating Graphics for Applications"
The example constructs a circle on your form with random FillColors and FillStyles as you click your mouse button. To try this example, paste the code into the Declarations section of a form. Then press F5 and click the form.
Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
FillColor = QBColor(Int(Rnd * 15)) ' Choose random FillColor.
FillStyle = Int(Rnd * 8) ' Choose random FillStyle.
Circle (X, Y), 250 ' Draw a circle.
End Sub