AnnTextAlign example for Visual Basic
Private Sub ExampleAnnTextAlignment(hObject As Long)
Dim ObjectType As AnnObjectType
Dim Align As Long
RasterAnn.AnnGetType hObject
ObjectType = RasterAnn.AnnType
If ObjectType <> ANN_OBJECT_TEXT Then
MsgBox "This Object is not an Text Object"
End If
Align = RasterAnn.AnnTextAlign(hObject)
If Align = TEXT_ALIGN_CENTER Then
Align = TEXT_ALIGN_LEFT
Else
Align = TEXT_ALIGN_CENTER
End If
RasterAnn.Flags = 0 'process only the specific object
RasterAnn.AnnTextAlign(hObject) = Align
End Sub