RE:barra de tareas window
como saber que posicion tiene la barra de tareas window
DECLARE LONG GetWindowRect IN "user32" LONG, STRING @
DECLARE LONG FindWindow IN "user32" STRING lpClassName, STRING lpWindowName
DECLARE INTEGER GetLastError IN kernel32.DLL
DECLARE INTEGER FormatMessage IN kernel32.DLL ;
INTEGER dwFlags, ;
STRING @lpSource, ;
INTEGER dwMessageId, ;
INTEGER dwLanguageId, ;
STRING @lpBuffer, ;
INTEGER nSize, ;
INTEGER Arguments
#DEFINE FORMAT_MESSAGE_FROM_SYSTEM 0x00001000
#DEFINE CR CHR(13)
lcRect = REPLICATE(CHR(0), 16)
lnHwnd = FindWindow("Shell_TrayWnd", "")
* lnHwnd = FindWindow(0, _screen.caption)
?"hWnd = ", lnHwnd
IF GetWindowRect(lnHwnd, @lcRect) <> 0
lnLeft = StrToLong(SUBSTR(lcRect, 1, 4))
? "Left = ", lnLeft
lnTop = StrToLong(SUBSTR(lcRect, 5, 4))
? "Top = ", lnTop
lnRight = StrToLong(SUBSTR(lcRect, 9, 4))
? "Right = ", lnRight
lnBottom = StrToLong(SUBSTR(lcRect, 13, 4))
? "Bottom = ", lnBottom
ELSE
lpBuffer = SPACE(128)
lnError = GetLastError()
=FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, ;
'WINERROR.H', lnError, 0, @lpBuffer, 128 , 0)
=MESSAGEBOX("System error has occurred." + CR + ;
"System Error code: " + ALLTRIM(STR(lnError)) + CR + ;
"System Error message: "+ALLT(lpBuffer),48,"ERROR")
ENDIF
FUNCTION StrToLong
* This function converts a String to a Long
PARAMETERS cLongStr
LOCAL nLoopVar, nRetval
nRetval = 0
FOR nLoopVar = 0 TO 24 STEP 8
nRetval = nRetval + (ASC(cLongStr) * (2^nLoopVar))
cLongStr = RIGHT(cLongStr, LEN(cLongStr) - 1)
NEXT
RETURN nRetval
Suerte