BkColor Property

Purpose

Returns or sets the background color for graphic commands.

Syntax

object.BkColor = [value]

object:Form Object
valueiexp

Description

Sets the background color for graphic commands. If you set the BackColor property on a Form object, all text, and graphics, including the persistent graphics (AutoRedraw), are erased. BkColor only sets the color, but doesn't erase the client area.

Initially, BkColor and BackColor have the same value.

Example

Form test

AutoRedraw = 1

Print "Backcolor: "; Hex(BackColor)

Print "BkColor: "; Hex(.BkColor)

DefFill 9

PBox 10, 35, 100, 125

.BkColor = RGB(0, 255, 255)

Text 0, 135, "New BkColor: " & Hex(.BkColor)

PBox 10, 150, 100, 240

Do

Sleep

Until Me Is Nothing

Remarks

ForeColor sets the foreground color.

See Also

ForeColor, BackColor

{Created by Sjouke Hamstra; Last updated: 24/09/2014 by James Gaite}