AnnGetNameOffsetX example for Visual Basic
‘This sample shifts the NameOffset of the annotation object hObject
‘two pixels in the X direction and one pixel in the Y direction
Private Sub SampleNameOffset(hObject As OLE_HANDLE)
Dim OffsetX As Long
Dim OffsetY As Long
OffsetX = LEAD1.AnnGetNameOffsetX(hObject)
OffsetY = LEAD1.AnnGetNameOffsetY(hObject)
OffsetX = OffsetX + 2
OffsetY = OffsetY + 1
MsgBox "Shifting Name Offset to " + CStr(OffsetX) + "," + CStr(OffsetY)
LEAD1.AnnSetNameOffsetX hObject, OffsetX, False
LEAD1.AnnSetNameOffsetY hObject, OffsetY, False
End Sub