Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows task bar height
Message
 
To
02/08/2000 18:17:24
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexico
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00399500
Message ID:
00400336
Views:
15
>Thanks George, i think i got it with this:
>
>DECLARE LONG GetSystemMetrics IN user32 LONG nIndex
>
>I can get the available width of the desktop area with GetSystemMetrics(16) and 17 for the height but the form is not centered. Autocenter = .t. not works. How can i know the position where the task bar is? and how can i get the first 0,0 desktop position available to center my form?
>
>The form is not centered when the task bar is up and to the left of the desktop. I think the API will work. What do you think?
>
>Thanks
>Héctor L.

I'm not so sure that the view is worth the climb. First, the user can have the task bar on auto-hide. If so, then centering the form would simply require making the calculation based on the current screen resolution. The function that I presented earlier, can retrieve this information as well.
lnstatus = SHAppBarMessage(4, @lcdata)
IF BITTEST(lnstatus, 0)
  ? "Auto-hide on"
ELSE
  ? "Auto-hide off"
ENDIF
IF BITTEST(lnstatus, 1)
  ? "Always on top on"
ELSE
  ? "Always on top off"
ENDIF
The code I presented earlier should give you what you need.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform