by Austin Coulbourn (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 4th November 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Determine the height of the title bar without any API calls.
Dim iOldTBH, iTBH As Integer
Private Sub Form_Load()
'Questions? Send them to [email protected]
'Store the current forms height
iOldTBH = Me.Height
'Set the forms height to zero, yes 0!
Me.Height = 0
'Store the new height of the form (windows will only allow a window to be as
'short as the total height of the title bar + boarders)
iTBH = Me.Height
'restore the original height of the form
Me.Height = iOldTBH
End Sub