FontName

This property returns and sets the font used to display text in a control or in a run-time drawing or printing operation.

Syntax

object.FontName [= font]

Parameters

object
Object expression that evaluates to a CommonDialog or TreeView control.
font
String expression that specifies the font name to use.

Remarks

The FontName property is unavailable at design time for the TreeView control.

FontName is included for use with the CommonDialog control.

Your system determines the default for this property. Fonts available with the toolkit vary depending on your system configuration and display devices. Font-related properties can be set only to values for which actual fonts exist.

In general, you should change FontName before setting size and style attributes with the FontSize, FontBold, FontItalic, FontStrikethru, and FontUnderline properties.

At run time, you can get information on fonts available to the system through the FontCount and Fonts properties.