VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Function to return the width of window border.

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.

Rate 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.

Download this snippet    Add to My Saved Code

Function to return the width of window border. Comments

No comments have been posted about Function to return the width of window border.. Why not be the first to post a comment about Function to return the width of window border..

Post your comment

Subject:
Message:
0/1000 characters