1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| Private Sub Form_Load()
Dim T As Integer
'recuperation des noms de fonte consernant l'imprimante active
On Error Resume Next
T = Printer.FontCount
If Err = 0 Then
For T = 1 To Printer.FontCount - 1
ListFonteImprim.AddItem Printer.Fonts(T)
Next T
Else
Err.Clear
End If
If ListFonteImprim.ListCount < 1 Then
ListFonteImprim.AddItem "pas de fonte installée pour l'imprimante par defaut"
End If
'recuperation des noms de fonte consernant le periphérique d'affichage (l'écran)
ListFonteEcran.Clear
For T = 1 To Screen.FontCount - 1
ListFonteEcran.AddItem Screen.Fonts(T)
Next T
If ListFonteEcran.ListCount < 1 Then
'************ Là, c'est super Graaaaaaaaavvvvvvveeeeee ***********
ListFonteEcran.AddItem "pas de fonte installée pour l'écran"
'*********************************************************
End If
ListFonteImprim.ListIndex = 0
ListFonteEcran.ListIndex = 0
End Sub |
Partager