Weight

This property returns and sets the weight of the characters that make up a Font object. The weight refers to the thickness of the characters. The higher the value, the thicker, or bolder, the character.

Syntax

object.Weight [= number]

Parameters

object
Object expression that evaluates to a Font object.
number
Numeric expression that specifies the weight of the font.

Remarks

The Font object is not directly available at design time. You set the Weight property of the Font object by selecting a control's Font property in the Properties window and choosing the Properties button. You implicitly set the Weight property by selecting an item from the Font Style box in the Font dialog box. The Regular and Italic settings have a Weight value of 400 (the default), and the Bold and Bold Italic settings have a Weight value of 700. At run time, however, you set Weight directly by specifying its setting for the Font object.

If you set a Font object's Weight to a value other than 400 or 700 at run time, Visual Basic for Windows CE converts your value to either 400 or 700, depending on which value is closest to the value you set. Following are the precise ranges for Weight: