AnnGetRotateOptions Example for Visual Basic
Private Sub ExampleAnnGetRotateOptions()
' This example displays if the annotation object displays
' rotate handles. If displaying rotate handles, the object
' is changed so that it does not display rotate handles.
' If not displaying rotate handles, the object is changed
' so that it displays rotate handles
Dim nRet As Integer
Dim szMsg As String
Dim hObject As Long
RasterAnn.AnnCreate ANN_OBJECT_TEXT, True, True
hObject = RasterAnn.AnnObject
RasterAnn.AnnRectLeft(hObject) = 0
RasterAnn.AnnRectTop(hObject) = 0
RasterAnn.AnnRectWidth(hObject) = 100
RasterAnn.AnnRectHeight(hObject) = 100
nRet = RasterAnn.AnnGetRotateOptions(hObject, ANN_ROTATE_SHOW_ROTATE_HANDLES)
If (nRet <> 0) Then Exit Sub
MsgBox "Old State: AnnShowRotateHandles: " + Str(RasterAnn.AnnShowRotateHandles)
' Change the state
nRet = RasterAnn.AnnSetRotateOptions(hObject, Not RasterAnn.AnnShowRotateHandles, 0, ANN_ROTATE_SHOW_ROTATE_HANDLES, False)
If (nRet <> 0) Then Exit Sub
nRet = RasterAnn.AnnGetRotateOptions(hObject, ANN_ROTATE_SHOW_ROTATE_HANDLES)
If (nRet <> 0) Then Exit Sub
MsgBox "New State: AnnShowRotateHandles: " + Str(RasterAnn.AnnShowRotateHandles)
End Sub