FillColor Property

See Also8JDJMA                 Example6KU46W>Low

Applies To

Form14TJ2LN, picture box31MYIWX, Printer objectCBQUDQ, shape9JZFLA.

Description

Determines the color used to fill in shapes; also used to fill in circles and boxes created with the Circle38E9WK and LineGU01B0 graphics methods.

Usage

{ [form.][control.]|Printer.}FillColor[ = color ]

Setting

The FillColor property settings are:

Setting             Description

 

Normal RGB colors    Colors set with the RGBLANRGB or QBColorNYS7SU functions in code.

System default colors Colors specified with the system color constantsTD9WSV 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 Panel56C790N settings.

 

By default, FillColor is set to 0 (black).

Remarks

When the FillStyle2N3S7OE property is set to its default, 1 (Transparent), the FillColor setting is ignored.

Data Type

Long103F6YL


See Also

Help:

BackColor, ForeColor Properties1W9T6JQ

FillStyle Property2N3S7OE

 

Programmer's Guide:

Chapter 15, "Creating Graphics for Applications"


FillColor Property Example

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