i want to list all fonts of the system in list1
but i dont't know, how to get them
where are they stored...???
:eek:
Printable View
i want to list all fonts of the system in list1
but i dont't know, how to get them
where are they stored...???
:eek:
Try This. :)
Code:Dim I As Integer
For I = 0 Printer.FontCount -1
List1.AddItem Printer.Fonts(i)
Next
That will work, but you will only get a list of printable fonts. To get all known fonts (doesn't include GDI synthesized fonts) on the system use the Screen object instead, like this:
I just wanted to point that out ;)Code:Private Sub ListFonts()
Dim idx As Long
Dim sFont As String
Screen.MousePointer = vbHourglass
List1.Visible = False
Call List1.Clear
For idx = 1 To Screen.FontCount Step 1
sFont = Screen.Fonts(idx)
If sFont <> vbNullString Then
Call List1.AddItem(sFont)
End If
Next idx
List1.Visible = True
Screen.MousePointer = vbDefault
'Just so you can see the comparison.
Call MsgBox("Number of Screen Fonts = " & Screen.FontCount & vbCrLf & _
"Number of Printer Fonts = " & Printer.FontCount)
End Sub
this way is also simple:
good luck :)Code:For i = 0 To Screen.FontCount - 1
List1.AddItem Screen.Fonts(i)
Next
Do not forget to set the the "Sorted" property of your Combo box to true
:)
keetsh
:)Quote:
Originally posted by keetsh
Do not forget to set the the "Sorted" property of your Combo box to true
:)
keetsh
Don't forget this, or your fonts will come out in a wacked up order!!!!!!!!!!!!!!!!!!
Hummm yes that is actually the primary meaning of 'sorted' :)
See you,
keetsh®
yeah, sorryQuote:
Originally posted by keetsh
Hummm yes that is actually the primary meaning of 'sorted' :)
See you,
keetsh®
Hehey no prob da_silvy :))
See you,
keetsh