[RESOLVED] Getting Taskbar Attributes...
I've come to a point in my application where it would help me out to know how to get the attributes of the user's windows taskbar (height in particular)
I want to make alert messages such as those found in AIM, Outlook, and a ton of other programs that you may have noticed. It is just a little form that slides up and fades away.
I do not want to take it for granted how "tall" a user's taskbar is because I know I have my taskbar doubled in size as I like to have my quick launch bar run along the bottom. Most people I could assume have it set to the normal size, but this won't be a good assumption in the long run I am sure.
Any takers? :-)
Re: Getting Taskbar Attributes...
3 hints :)
1) VbPixels @ Scalemode
2) An API
3) Screen.Height
To help ya on your way :)
VB Code:
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SPI_GETWORKAREA As Long = 48
Private Type RECT
lLeft As Long
lTop As Long
lRight As Long
lBottom As Long
End Type
Private tScreen As RECT
Public Function GetTaskBarHeight() As Integer
Call SystemParametersInfo(SPI_GETWORKAREA, 0, tScreen, 0)
tScreen.lLeft = tScreen.lLeft * Screen.TwipsPerPixelX
tScreen.lRight = tScreen.lRight * Screen.TwipsPerPixelX
tScreen.lTop = tScreen.lTop * Screen.TwipsPerPixelY
tScreen.lBottom = tScreen.lBottom * Screen.TwipsPerPixelY
GetTaskBarHeight = Screen.Height - tScreen.lBottom
End Function
Re: Getting Taskbar Attributes...
Devion... buy ya a beer?
Worked flawlessly.
Now I can end my sliding form RIGHT at the top edge of the taskbar like I wanted!
Thank you very much, buddy!
Re: Getting Taskbar Attributes...
Quote:
Originally Posted by joshjoneswas
I want to make alert messages such as those found in AIM, Outlook, and a ton of other programs that you may have noticed. It is just a little form that slides up and fades away.
You need Wokawidget's excellent Component Suite, which, among other things, contains a MSN-messenger style notifications DLL (It also contains an MSN client :p)
Re: Getting Taskbar Attributes...
Feel free to send any beer, then again.. I'd do for just a simple Rep add ;)
Re: Getting Taskbar Attributes...
Penagate: I had no idea that existed although a friend was telling me about some classes he wrote that would do the job... although not nearly as GREAT looking as Wokawidgets' !
Devion: I'm the new kid to the forum. Tried spreading ya some love.. but I just can't I suppose. :wave:
Thanks again to both of you!
Re: [RESOLVED] Getting Taskbar Attributes...