Este ejemplo lo baje de una lista de correo hace un tiempo, el alto util del form pareceria que lo calcula bien.
espero te ayude.
*- La barra de tareas es una ventana de windows, así que busco esa ventana y le saco las dimensiones
LOCAL lnBarraTareas, lpRect
LOCAL lnWinLeft,lnWinTop,lnWinRight,lnWinBottom,lnWinWidth,lnWinHeight
LOCAL lnAlto, lnAncho
DECLARE INTEGER FindWindow IN WIN32API STRING cNULL, STRING cWinName
DECLARE INTEGER GetWindowRect IN user32 INTEGER hwnd, STRING @lpRect && Saber Dimensiones de una ventana
BarraTareas = FindWindow("Shell_TrayWnd", NULL)
lpRect = REPLI (Chr(0), 16)
= GetWindowRect(BarraTareas, @lpRect)
lnWinLeft = Buf2Int(SUBSTR(lpRect, 1,4))
lnWinTop = Buf2Int(SUBSTR(lpRect, 5,4))
lnWinRight = Buf2Int(SUBSTR(lpRect, 9,4))
lnWinBottom = Buf2Int(SUBSTR(lpRect, 13,4))
lnWinWidth = lnWinRight - lnWinLeft + 1
lnWinHeight = lnWinBottom - lnWinTop + 1
****** LO QUE NECESITAS TÚ *******
*lnAncho = SYSMETRIC(1) - lnWinWidth
lnAlto = SYSMETRIC(2) - lnWinHeight
**********************************************
MESSAGEBOX(lnAlto)
* MESSAGEBOX(lnAncho)
FUNCTION Buf2Int(cBuffer)
RETURN Asc(SUBSTR(cBuffer, 1,1)) + ;
BitLShift(Asc(SUBSTR(cBuffer, 2,1)), 8) +;
BitLShift(Asc(SUBSTR(cBuffer, 3,1)), 16) +;
BitLShift(Asc(SUBSTR(cBuffer, 4,1)), 24)
saludos, luis.
Luis Petek
Developer