Returns or sets the font used to display text 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.FontName [= font]
The parts of the FontName property syntax are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
font | A string expression specifying the font name to use. |
The default for this property is determined by the system. 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 fonts exist.
In general, you should change FontName before setting size and style attributes with the FontSize, FontBold, FontItalic, FontStrikethru, and FontUnderline properties.
Note At run time, you can get information on fonts available to the system through the FontCount and Fonts properties.