Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why _screen w/o tittle bar cover taskbar?
Message
 
À
30/06/2009 05:31:31
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01409112
Message ID:
01409295
Vues:
50
>>>>>>>May be subtract the task bar height from the _screen height?
>>>>>>This could be very tricky if the user set "Auto-Hide Taskbar" to true :-)
>>>>>
>>>>>Better than have it covered :)))
>>>>
>>>>Now you put me in meditation :-)))))
>>>>How can I find Taskbar height :-)
>>>>(Start searching for APIs)
>>>
>>>
TaskBarHeight()
>>>Function TaskBarHeight
>>>Declare Integer GetWindowRect In user32;
>>>INTEGER HWnd, String lpRect
>>>Declare Integer FindWindow In user32;
>>>STRING lpClassName,;
>>>STRING lpWindowName
>>>
>>>Local cBuffer
>>>cBuffer = Replicate(Chr(0), 16)
>>>hWindow= FindWindow('Shell_TrayWnd', '')
>>>cRect = GetWinRect(hWindow)
>>>? "The height of your taskbar is "+trans(buf2dword(Substr(cRect, 13,4))-buf2dword(Substr(cRect, 5,4)))
>>>Function GetWinRect(hWindow)
>>>Local cBuffer
>>>cBuffer = Replicate(Chr(0), 16)
>>>= GetWindowRect(hWindow, @cBuffer)
>>>Return cBuffer
>>>Function buf2dword(lcBuffer)
>>>Return Asc(Substr(lcBuffer, 1,1)) + ;
>>>BitLShift(Asc(Substr(lcBuffer, 2,1)),  8) +;
>>>BitLShift(Asc(Substr(lcBuffer, 3,1)), 16) +;
>>>BitLShift(Asc(Substr(lcBuffer, 4,1)), 24)
>>
>>
>>Thank you Mike
>
>Borislav,
>
>Just something I like to point out:
>
>The taskbar is not restricted to bottom. It might be moved it to any boundary
>
>(And the calclation width height of a taskbar on left border might create fancy results ...)
>
>Agnes

:-))))
Thank you Agnes. I know that, so I stick with a BINDEVENT(). Now I put it into serious testing -)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform