I'd like to be able to determine if the Windows Status bar is on Auto-Hide, and if not what it's height is.
Any suggestions?
Andy Snyder
SnyAc Software Services
Any suggestions?
Andy Snyder
SnyAc Software Services
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.
DECLARE Long FindWindow IN user32 AS API_FindWindow String@, String@
lLng_TaskHWnd = API_FindWindow("Shell_TrayWnd", 0)
DECLARE Long GetWindowRect IN user32 As API_GetWindowRect Integer, String@
lStr_WindowRect = SPACE(16)
lLng_RetVal = API_GetWindowRect (lLng_TaskHWnd, @lStr_WindowRect)
lLng_TaskLeft = ConvertStringToInteger (lStr_WindowRect, 1)
lLng_TaskTop = ConvertStringToInteger (lStr_WindowRect, 5)
lLng_TaskRight = ConvertStringToInteger (lStr_WindowRect, 9)
lLng_TaskBottom = ConvertStringToInteger (lStr_WindowRect, 13)
FUNCTION ConvertStringToInteger (vStr_FullString, vInt_Offset) As Integer
LOCAL lInt_RetVal As Integer
lInt_RetVal = 0
IF (vInt_Offset + 3 <= LEN(vStr_FullString))
lInt_RetVal = ASC(SUBSTR(vStr_FullString, vInt_Offset + 3, 1)) * 16777216 + ;
ASC(SUBSTR(vStr_FullString, vInt_Offset + 2, 1)) * 65536 + ;
ASC(SUBSTR(vStr_FullString, vInt_Offset + 1, 1)) * 256 + ;
ASC(SUBSTR(vStr_FullString, vInt_Offset + 0, 1))
ENDIF
IF (lInt_RetVal > 2147483648)
lInt_RetVal = lInt_RetVal - 4294967295 - 1
ENDIF
RETURN lInt_RetVal
ENDFUNC
* Returns the height of the physical screen, taking
* account of the taskbar, if visible.
LOCAL lcBuffer, lcDWord
lcBuffer = SPACE(16)
SystemParametersInfo(48, 0, @lcBuffer, 0)
lcDWord = SUBSTR(lcBuffer, 13, 4)
&& or take bytes 9-12 for the screen width
RETURN ASC(SUBSTR(lcDWord, 1,1)) + ;
BITLSHIFT(ASC(SUBSTR(lcDWord, 2,1)), 8) +;
BITLSHIFT(ASC(SUBSTR(lcDWord, 3,1)), 16) +;
BITLSHIFT(ASC(SUBSTR(lcDWord, 4,1)), 24)