|
-
Aug 19th, 2005, 04:23 AM
#1
Thread Starter
Junior Member
[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? :-)
-
Aug 19th, 2005, 04:28 AM
#2
Frenzied Member
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
-
Aug 19th, 2005, 04:32 AM
#3
Thread Starter
Junior Member
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!
-
Aug 19th, 2005, 04:35 AM
#4
Re: Getting Taskbar Attributes...
 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 )
-
Aug 19th, 2005, 04:37 AM
#5
Frenzied Member
Re: Getting Taskbar Attributes...
Feel free to send any beer, then again.. I'd do for just a simple Rep add
-
Aug 19th, 2005, 05:02 AM
#6
Thread Starter
Junior Member
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.
Thanks again to both of you!
-
Aug 19th, 2005, 06:06 AM
#7
Frenzied Member
Re: [RESOLVED] Getting Taskbar Attributes...
Haha, no prob m8
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|