by Evan Edwards (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Wed 14th March 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Function to return the width of window border.
Private Function WindowBorderWidth
WindowBorderWidth = ((Me.Width - (Me.ScaleWidth * Screen.TwipsPerPixelX)) \ Screen.TwipsPerPixelX)\2
End Function
'Knowing the Windows border-width is handy for some centering and size-limiting tasks.
'This is the border-width for ever form on the system, sides, top, and bottom.
'The Windos border-with can be changed in Display Properties.