I am wondering what is the best way to get the height of a forms border (the area at the top of the form that usually has minimize / maximize buttons) in pixels?
In the code below, the width of the border is found, but it is obviously NOT a very good solution.
Private Sub Command1_Click()
'Get the width of the forms border
Form1.WindowState = vbMaximized
Dim BorderWidth As Long
BorderWidth = (Screen.Height - Form1.Height)
Form1.WindowState = vbNormal
MsgBox BorderWidth
End Sub
In the code below, the width of the border is found, but it is obviously NOT a very good solution.
Private Sub Command1_Click()
'Get the width of the forms border
Form1.WindowState = vbMaximized
Dim BorderWidth As Long
BorderWidth = (Screen.Height - Form1.Height)
Form1.WindowState = vbNormal
MsgBox BorderWidth
End Sub