I am at home now, and have VB here. I found this in the VB help files.
Here's the easy way to do it. There is a font collection associated with both the printer and the screen. You just loop through this collection and add the fonts to the list box.
To list the fonts associated with the screen, do the following:
- Start a new project
- Drop a ListBox and a CommandButton on the form (keep the default names)
- Copy the code below and paste it into the form's code window
- Run the project and click the command button
Code:
Option Explicit
Private Sub Command1_Click()
Dim lCounter As Long
For lCounter = 0 To Screen.FontCount - 1
List1.AddItem Screen.Fonts(lCounter)
Next lCounter
End Sub
To list the fonts associated with the printer, just substitute "Printer" for "Screen" in the above code.
Hope you didn't spend your WHOLE weekend searching...I found this in less than 2 minutes in the VB help files under "FontCount property".