Returns or sets the size of the font to be used for text displayed in a control or in a run-time drawing or printing operation. This property is not available at design-time for the TreeView control.
Note The FontName property is included for use with the CommonDialog control. For additional functionality, use the new Font object properties (not available for the CommonDialog control).
object.FontSize [= points]
The parts of the FontSize property syntax are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
points | A numeric expression specifying the font size to use, in points. |
Use this property to format text in the font size you want. The default is determined by the system. To change the default, specify the size of the font in points.
The maximum value for FontSize is 2160 points.
Note Fonts available with the toolkit vary depending on your system configuration, display devices, and printing devices. Font-related properties can be set only to values for which fonts exist.
In general, you should change the FontName property before you set size and style attributes with the FontSize, FontBold, FontItalic, FontStrikethru, and FontUnderline properties. However, when you set TrueType fonts to smaller than 8 points, you should set the point size with the FontSize property, then set the FontName property, and then set the size again with the FontSize property.