$INCLUDE "windowssdk.inc"
OpenConsole
UINT dpiX, dpiY
dpiX = GetDeviceCaps(GetWindowDC(0), HORZSIZE)
dpiY = GetDeviceCaps(GetWindowDC(0), VERTSIZE)
print " ",dpiX," mm wide, ",dpiY," mm tall\n"
print (dpiX/25.4)," in wide, ",(dpiY/25.4)," in tall\n"
dpiX = GetDeviceCaps(GetWindowDC(0), LOGPIXELSX)
dpiY = GetDeviceCaps(GetWindowDC(0), LOGPIXELSY)
print " ",dpiX," pixels per inch wide , ",dpiY," pixels per in tall\n"
waituntil inkey$ = chr$(27)
CloseConsole
end
$INCLUDE "windowssdk.inc"
OpenConsole
UINT dpiX, dpiY
dpiX = GetDeviceCaps(GetWindowDC(0), HORZSIZE)
dpiY = GetDeviceCaps(GetWindowDC(0), VERTSIZE)
print " ",dpiX," mm wide, ",dpiY," mm tall\n"
print (dpiX/25.4)," in wide, ",(dpiY/25.4)," in tall\n"
waituntil inkey$ = chr$(27)
CloseConsole
end