FoxPro/Visual FoxPro - barra de tareas window

 
Vista:

barra de tareas window

Publicado por EXTREMO (78 intervenciones) el 20/12/2006 18:34:09
Hola foxeros

otra vez con mis problemas

alguien sabe como saber que tamaño y posicion tiene la barra de tareas window (me refiero a la barra donde aparece el boton INICIO de windows)

si alguien sabe... uffffff es un experto

de antemano muchisimas Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

RE:barra de tareas window

Publicado por Ernesto Hernandez (4623 intervenciones) el 20/12/2006 23:37:29
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
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

muchas gracias

Publicado por EXTREMO (78 intervenciones) el 21/12/2006 12:14:20
Muchas gracias amigo

Me salvastes
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:barra de tareas window

Publicado por Ernesto Hernandez (4623 intervenciones) el 20/12/2006 23:40:20
Recuerda

Las funciones API te regresaran un valor que debe de ser traducido por VFP a algo que tu y tu aplicacion puedan entender, en este caso el tamaño y la posicion del barra de tareas

:-)

Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar