VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Determine the height of the title bar without any API calls.

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.

Rate 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


Download this snippet    Add to My Saved Code

Determine the height of the title bar without any API calls. Comments

No comments have been posted about Determine the height of the title bar without any API calls.. Why not be the first to post a comment about Determine the height of the title bar without any API calls..

Post your comment

Subject:
Message:
0/1000 characters