Fonts Property

See Also108QXCK                 Example1N3PFV7>Low

Applies To

Printer objectCBQUDQ, Screen object1052P0.


Specifies all font names available for the current display device or active printer when enumerated from 0 to FontCount - 1.  Not available at design time; read-only at run time.




The Fonts property works in conjunction with the FontCount8I4LCS property, which returns the number of font names available for the object.  Fonts available in Visual Basic vary according to your system configuration, display devices, and printing devices.  Use both the Fonts and the FontCount properties to get information about available screen or printer fonts.

Data Type


See Also


FontBold, FontItalic, FontStrikethru, FontTransparent, FontUnderline Properties5NZYQSD

FontName PropertyB3RMO3

FontSize PropertyB3WV13

TextHeight Method4OFKMKO

TextWidth Method8ZWV014


Programmer's Guide:

Chapter 16, "Displaying and Printing Information"

Fonts Property Example

The example prints a list of the printer fonts in a list box.  To try this example, paste the code into the Declarations section of a form that has a list box control named List1.  Press F5 to run the program and then click the form.

Sub Form_Click ()
  Dim I                                 ' Declare variable.
  For I = 0 To Printer.FontCount -1     ' Determine number of fonts.
    List1.AddItem Printer.Fonts (I)     ' Put each font into list box.
  Next I
End Sub