A function to easily Center any object on a form, bothe vertically and horizontally.
A function to easily Center any object on a form, bothe vertically and horizontally.
Rate A function to easily Center any object on a form, bothe vertically and horizontally.
(2(2 Vote))
'OwnerForm is the form that the Object is on.
Public Sub CenterImage(ObjectToCenter As Object, OwnerForm As Form)
ObjectToCenter.Top = ((OwnerForm.ScaleHeight - ObjectToCenter.Height) / 2)
ObjectToCenter.Left = ((OwnerForm.ScaleWidth - ObjectToCenter.Width) / 2)
'For more VB, great software and more goto http://www.yarinteractive.com
'The Homepage of yar-interactive software
End Sub
A function to easily Center any object on a form, bothe vertically and horizontally. Comments
No comments yet — be the first to post one!
Post a Comment