AllApi.net

[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
Const LOGPIXELSX = 88
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
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    If IsScreenFontSmall = True Then
        MsgBox "You're using Small Fonts"
    Else
        MsgBox "You're using Large Fonts"
    End If
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/