Enumerating Fonts
This tip shows you how to populate a list box with a list of all available
fonts. When you click on the font in the list box, it changes the list's font to the one
that you selected.
Code to fill list box with fonts
Dim counter As Integer
For counter = 0 To Screen.FontCount - 1
List1.AddItem Screen.Fonts(counter)
Next
List1_Click Code
Private Sub List1_Click()
Static tempheight As Single
If tempheight = 0 Then tempheight = List1.Height
List1.Font.Name = List1.List(List1.ListIndex)
List1.Height = tempheight
End Sub
|