Where is your Taskbar usually located?
Where is your Taskbar usually located?
As we know the Taskbar can be located on any side of the screen, but it's
usually on the bottom. In one of my apps I need to center a window and I
want to take the Taskbar position into account, but I'm wondering whether
it's better to just assume it's at the bottom, or should I use extra code and
allow for any of the 4 positions? So, please tell: where is yours located?
usually on the bottom. In one of my apps I need to center a window and I
want to take the Taskbar position into account, but I'm wondering whether
it's better to just assume it's at the bottom, or should I use extra code and
allow for any of the 4 positions? So, please tell: where is yours located?
Last edited by PB on Sat Dec 01, 2007 4:58 am, edited 2 times in total.
Re: Where is your Taskbar usually located?
Okay, who voted "Other" and why? 

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
may help you
Code: Select all
getwindowrect_(GetDesktopWindow_(),rect.rect)
Debug "Full-Screen"
Debug rect\left
Debug rect\top
Debug rect\right
Debug rect\bottom
SystemParametersInfo_(#SPI_GETWORKAREA,0,rect.rect,0)
Debug "Desktop-Area"
Debug rect\left
Debug rect\top
Debug rect\right
Debug rect\bottom
-
- Addict
- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
-
- Addict
- Posts: 2344
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
bottom, the taskbar issue caused me a lot of headache when dealing with multiple monitors...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
> may help you
Thanks GPI, but here was some code I already wrote to get the Taskbar stats:
Maybe it's of some use to someone else here. 
Thanks GPI, but here was some code I already wrote to get the Taskbar stats:
Code: Select all
TaskbarSize.RECT : SystemParametersInfo_(#SPI_GETWORKAREA,0,TaskbarSize,0)
TaskbarPos.APPBARDATA : SHAppBarMessage_(#ABM_GETTASKBARPOS,TaskbarPos)
Select TaskbarPos\uEdge
Case #ABE_LEFT : Debug "Left, Width = "+Str(TaskbarSize\left)+", Height = "+Str(TaskbarSize\bottom)
Case #ABE_TOP : Debug "Top, Width = "+Str(GetSystemMetrics_(#SM_CXSCREEN)-TaskbarSize\left)+", Height = "+Str(GetSystemMetrics_(#SM_CYSCREEN)-(TaskbarSize\bottom-TaskbarSize\top))
Case #ABE_RIGHT : Debug "Right, Width = "+Str(GetSystemMetrics_(#SM_CXSCREEN)-TaskbarSize\right-TaskbarSize\left)+", Height = "+Str(TaskbarSize\bottom)
Case #ABE_BOTTOM : Debug "Bottom, Width = "+Str(GetSystemMetrics_(#SM_CXSCREEN)-TaskbarSize\left)+", Height = "+Str(GetSystemMetrics_(#SM_CYSCREEN)-TaskbarSize\bottom)
EndSelect

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.