Sind große oder kleine Schriftarten installiert ?
[Windows 95/98/NT/2000]

01.09.1999


In den Eigenschaften der Anzeige kann man
    entweder große oder kleiner Schriftarten einstellen.
    Mit folgender Routine stellen Sie fest, was eingestellt ist:

 

ERFORDERLICHE OBJEKTE
   1 Commandbutton (Command1)

 FORM-CODE
   Private Declare Function GetDesktopWindow Lib "user32" () _
      As Long Private Declare Function GetDC Lib "user32" _
      (ByVal hwnd As Long) As Long
   Private Declare Function GetDeviceCaps Lib "gdi32" _
      (ByVal hdc As Long, ByVal nIndex As Long) As Long
   Private Declare Function ReleaseDC Lib "user32" _
      (ByVal hwnd As Long, ByVal hdc As Long) As Long
   Private Function Small_Font() As Boolean
      Dim hWndDesktop As Long
      Dim hDCDesktop As Long
      Dim Pixel_Horizontal As Long
      Dim r As Long hWndDesktop = GetDesktopWindow()
      hDCDesktop = GetDC(hWndDesktop)
      Pixel_Horizontal = GetDeviceCaps(hDCDesktop, 88)
      r = ReleaseDC(hWndDesktop, hDCDesktop)
      Small_Font = Pixel_Horizontal = 96
   End Function
   Private Sub Command1_Click()
      If Small_Font() Then
         t = "kleine"
      Else
         t = "große"
      End If
      MsgBox "Es werden " & t & " Schriftarten verwendet !", _
         vbInformation, "Schrifthöhe"
   End Sub
 

Download - 2 KB