Hi, i wrote a dec2hex calculator which startup-position should be exactly above the taskbar. With this function, you can retrieve the height of the taskbar. Paste the following code into a form or module.
GeSHi (vb):
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Const SPI_GETWORKAREA = 48
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 Function GetTaskBarHeight(Optional outputInPixel As Boolean = True) As Long
Dim r As RECT
SystemParametersInfo SPI_GETWORKAREA, 0, r, 0
GetTaskBarHeight = (Screen.Height / Screen.TwipsPerPixelY) - r.Bottom
Select Case outputInPixel
Case False
GetTaskBarHeight = GetTaskBarHeight * Screen.TwipsPerPixelY
End Select
End Function
Created by GeSHI 1.0.7.20
The optional Parameter
outputInPixel is used to return the height in pixel or in twips, pixel output as default.