How to check Windows Font Size
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 'Fonts - How to check Windows Font Size 'This example will return 'True' if the font size is small, and 'False' If font size is large 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 Const LOGPIXELSX = 88 Public Function IsScreenFontSmall() As Boolean Dim hWndDesk As Long, hDCDesk As Long, logPix As Long hWndDesk = GetDesktopWindow() hDCDesk = GetDC(hWndDesk) logPix = GetDeviceCaps(hDCDesk, LOGPIXELSX) Call ReleaseDC(hWndDesk, hDCDesk) IsScreenFontSmall = (logPix = 96) End Function Private Sub Main() MsgBox IsScreenFontSmall End Sub |
Related posts:
- How to Get Color Depth
- How to Capture the Screen
- How to Add/Remove new Font
- How to create a self Closing Message Box
- How to make editable List Box
- How to get list of all windows
- Vb6 Advanced Font Change Tutorial
- How to Cascade Internet Explorer windows on the desktop
- How to set a desired font globally on VB IDE. i.e., each and every time I should not change it.
- How to expand the width of a combobox to the width of the listed items