BorderColor Property

See Also22KW3NX

Applies To

LineTW530P, shape9JZFLA.


Determines the color of a control's border.


[form.]{ line|shape}.BorderColor[ = color ]


Visual Basic uses the Microsoft Windows environment RGB scheme for colors.  The BorderColor property has the following range of settings:

Range of settings       Description


Normal RGB colors     Colors specified by using the Color palette11468R9, or by using the RGBLANRGB or QBColorNYS7SU functions in code.

System default colors  Colors specified with system color constants from CONSTANT.TXT, a Visual Basic file that specifies system defaults.  The Windows environment substitutes the user's choices, as specified in the user's Control Panel settings.


The default setting for BorderColor is the WINDOW_TEXT system default color, as specified in CONSTANT.TXT.


The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF).  The high byte of a number in this range equals 0; the lower three bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively.  The red, green, and blue components are each represented by a number between 0 and 255 (&HFF).  If the high byte is not 0, Visual Basic uses the system colors, as defined in the user's Control Panel and enumerated in CONSTANT.TXT.

Data Type


See Also


BackColor, ForeColor Properties1W9T6JQ

DrawWidth PropertyMEUSKJ


Programmer's Guide

Chapter 15, "Creating Graphics for Applications"