Make your own free website on

[an error occurred while processing this directive]
Public Declare Function GetDesktopWindow Lib "user32" () As Long
Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Public Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Public Function IsScreenFontSmall() As Boolean
    Dim hWndDesk As Long, hDCDesk As Long
    Dim logPix As Long, r As Long
    'Get the handle of the desktop window
    hWndDesk = GetDesktopWindow()
    'Get the desktop window's device context
    hDCDesk = GetDC(hWndDesk)
    'Get the width of the screen
    logPix = GetDeviceCaps(hDCDesk, LOGPIXELSX)
    'Release the device context
    r = ReleaseDC(hWndDesk, hDCDesk)
    IsScreenFontSmall = (logPix = 96)
End Function
Private Sub Form_Load()
    'KPD-Team 1999
    If IsScreenFontSmall = True Then
        MsgBox "You're using Small Fonts"
        MsgBox "You're using Large Fonts"
    End If
End Sub

Copyright © 1998-2000, The KPD-Team.
Send mail to with comments about this web site.
This site is located at