Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#DEFINE TWIPS_IN_CM 567
#DEFINE HWND_DESKTOP 0
#DEFINE LOGPIXELSX 88
#DEFINE LOGPIXELSY 90
?TwipsToMM(5300)
?TwipsPerPixelX()
?TwipsPerPixelY()
FUNCTION TwipsToMM
LPARAMETER tnTwips
RETURN INT(((tnTwips + 0.0005) / TWIPS_IN_CM) * 10)
ENDFUNC
FUNCTION TwipsPerPixelX
LOCAL lnDC, lnTwipsPerpixelX
DECLARE LONG GetDC IN "user32" LONG hwnd
DECLARE LONG ReleaseDC IN "user32" LONG hwnd, LONG hdc
DECLARE LONG GetDeviceCaps IN "gdi32" LONG hdc, LONG nIndex
lnDC = GetDC(HWND_DESKTOP)
lnTwipsPerpixelX = 1440 / GetDeviceCaps(lnDC, LOGPIXELSX)
ReleaseDC(HWND_DESKTOP, lnDC)
RETURN lnTwipsPerpixelX
ENDFUNC
FUNCTION TwipsPerPixelY
LOCAL lnDC
DECLARE LONG GetDC IN "user32" LONG hwnd
DECLARE LONG ReleaseDC IN "user32" LONG hwnd, LONG hdc
DECLARE LONG GetDeviceCaps IN "gdi32" LONG hdc, LONG nIndex
lnDC = GetDC(HWND_DESKTOP)
lnTwipsInPixelY = 1440 / GetDeviceCaps(lnDC, LOGPIXELSY)
ReleaseDC(HWND_DESKTOP, lnDC)
RETURN lnTwipsInPixelY
ENDFUNC