devxlogo

IsSystemFontSmall – Checking whether the system is using small fonts

IsSystemFontSmall – Checking whether the system is using small fonts

 Shared Function _    GetDesktopWindow() As IntegerEnd Function Shared Function GetDC _    (ByVal hWnd As Integer) As IntegerEnd Function Shared Function _    GetDeviceCaps(ByVal hDC As Integer, ByVal nIndex As Integer) As IntegerEnd Function Shared Function ReleaseDC _    (ByVal hWnd As Integer, ByVal hDC As Integer) As IntegerEnd Function    ' Returns a boolean indicating whether ths system is using small fontsFunction IsSystemFontSmall() As Boolean    Const LOGPIXELSX = 88    ' get its device context    Dim hDC As Integer = GetDC(GetDesktopWindow())    ' if the number of pixels per logical inch is = 96    ' then Windows is using small system font    IsSystemFontSmall = (GetDeviceCaps(hDC, LOGPIXELSX) = 96)    ' release the device context    ReleaseDC(GetDesktopWindow(), hDC)End Function

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist