Page 1 of 1
Re: How to: Get the current Windows taskbar height
Posted: Sun Jan 03, 2010 2:27 am
by netmaestro
Almost. You have to take into account that a PB window opened to supplied width and height will have a
client area with those dimensions. You'll have to subtract the caption and borders to get what you're looking for:
Code: Select all
SystemParametersInfo_(#SPI_GETWORKAREA, 0, @DesktopRect.RECT, 0)
DesktopX = DesktopRect\left
DesktopY = DesktopRect\top
DesktopWidth = DesktopRect\right - DesktopRect\left
DesktopHeight = DesktopRect\bottom - DesktopRect\top
DesktopWidth-GetSystemMetrics_(#SM_CXFIXEDFRAME)*2
DesktopHeight-(GetSystemMetrics_(#SM_CYCAPTION)+GetSystemMetrics_(#SM_CYFIXEDFRAME)*2)
OpenWindow(0,DesktopX,DesktopY,DesktopWidth,DesktopHeight,"",#PB_Window_SystemMenu)
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
Re: How to: Get the current Windows taskbar height
Posted: Sun Jan 03, 2010 2:59 am
by charvista
Indeed, this is more accurate.
I appreciate your help very much.
Richard
Re: How to: Get the current Windows taskbar height
Posted: Sun Jan 03, 2010 9:27 am
by Kwai chang caine
Thanks NETMAESTRO
I use your tips immediately, for my new application

Re: How to: Get the current Windows taskbar height
Posted: Sun Jan 03, 2010 11:22 am
by srod
Kwaï chang caïne wrote:Thanks NETMAESTRO
I use your tips immediately, for my new application

Everyone is advised to take cover, KCC is working on a new application! Lock up your dll's, hide those tips and tricks, and for God's sake don't let him near the drinks cabinet!
(Sorry KCC, I couldn't resist!)
Re: How to: Get the current Windows taskbar height
Posted: Sun Jan 03, 2010 12:54 pm
by charvista
Haha, there we have the good old Kwaï chang caïne
I'm glad the code will be of use in your new application !
Hopely you will share it with us when finished

Re: How to: Get the current Windows taskbar height
Posted: Sun Jan 03, 2010 6:29 pm
by Kwai chang caine
My MASTER wrote:Everyone is advised to take cover, KCC is working on a new application! Lock up your dll's, hide those tips and tricks, and for God's sake don't let him near the drinks cabinet!
Oooohh, my master give to me the great honor to insult me

It's already a pleasure to read you

Even when you take your legs was shot, for go far of KCC

It's a too long time, that i have not "blablabla" with you
My dream....you and me alone in a farmhouse :roll:
Me i drunk you with all my question...you like my grandma.... always answer to me, and kind with your little KCC, and in the same time, you knit socks or scarf for KCC against the hard winter :roll:
I'm sure it's also your dream...i'm sure
@CHARVISTA
Yes ....it's for my tiny "FlowChart"

For be sure the windows is open a maximum
Thanks for your kind message
