Hi,
I have a form of variable height. When the form grows in height I have code that verifies if the bottom of the form will come below the bottom of the screen and, if so, moves the form up - no problem until here.
However, some of my users have taskbars that are two lines in height and my code only deals with sinlge-line taskbars by moving the form 450 twips further up (hardcoded is bad - I know). I would like to be able to tell how high the taskbar is and then move the form accordingly.
Here's my current code:
Private Sub cmdGrowForm_Click()
Dim NewH As Integer
Dim TBarH As Integer
TBarH = 450 'Assumes a single row taskbar
NewH = 11010 'New form height
If Me.Top + NewH + TBarH > Screen.Height Then
Me.Top = Screen.Height - NewH - TBarH
End If
Me.Height = NewH
End Sub
So my question is - is there a way of getting the taskbar height in VB?
Could somebody try to point me in the correct direction? Even if it is only "You can't get the taskbar height in VB." as answer that's great for me.
Thanks
Yomet