Quick and easy way to snap objects onto a predefined spot... I often use frames and other container
Quick and easy way to snap objects onto a predefined spot... I often use frames and other containers to group together controls which will be
API Declarations
SNAP_LOWER_LEFT
SNAP_LOWER_RIGHT
SNAP_UPPER_LEFT
SNAP_UPPER_RIGHT
End Enum
Rate Quick and easy way to snap objects onto a predefined spot... I often use frames and other container
(1(1 Vote))
SnapPosition As SNAP_POSITIONS, Optional bShowAfterMove As Boolean = False)
On Error Resume Next
oObject.Visible = False
Select Case SnapPosition
Case SNAP_LOWER_RIGHT
oObject.Top = linePointer.Y1 - oObject.Height
oObject.Left = linePointer.X1 - oObject.Width
Case SNAP_UPPER_RIGHT
oObject.Top = linePointer.Y1
oObject.Left = linePointer.X1 - oObject.Width
Case SNAP_LOWER_LEFT
oObject.Top = linePointer.Y1 - oObject.Height
oObject.Left = linePointer.X1
Case SNAP_UPPER_LEFT
oObject.Top = linePointer.Y1
oObject.Left = linePointer.X1
End Select
If bShowAfterMove Then oObject.Visible = True
On Error GoTo 0
End Sub
Quick and easy way to snap objects onto a predefined spot... I often use frames and other container Comments
No comments yet — be the first to post one!
Post a Comment