Weight Property (AFont)

Returns or sets the weight used in the font.

Syntax

Object.Weight [ = nWeight ]

The Weight property syntax has the following parts:

 

Name

Type

Description

Object

AFont

AFont object

nWeight

Short

A number specifying the weight used in the font.

Where

nWeight can be one of the following:

 

Value

Description

0

Don't care.

100

Thin

200

Extralight

300

Light

400

Normal

500

Medium

600

Semibold

700

Bold

800

Extrabold

900

Heavy

Example

The following statement changes the font of the caption property of a button object to be of extrabold Weight:

btn1.Caption.Weight=800

The following statement changes the font of a declared variable font1 of type m_font to be of normal Weight:

m_font1.Weight=400

Applies to

AFont

See Also

Charset, Italic, Size, Strikethrough, Underline