devxlogo

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

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Five Early Architecture Decisions That Quietly Get Expensive

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.