See Also Example
Applies To
Printer object, Screen object
Description
Specifies the number of fonts available for the current display device or currently active printer; not available at design time and read-only at run time.
Usage
{ Printer|Screen}.FontCount
Remarks
Use this property with the Fonts Fonts available in Visual Basic vary according to your system configuration, display devices, and printing devices.
Data Type
Integer
Help:
FontName Property
Fonts Property
Programmer's Guide:
Chapter 16, "Displaying and Printing Information"
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. Then Press F5 and 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