GetSelectedAnnotationLineStyle Example VB

This example uses the GetSelectedAnnotationLineStyle method to determine whether a selected line or hollow rectangle annotation is opaque or transparent, and the SetSelectedAnnotationLineStyle method to change the line style.

Private Sub Form_Load()
    'This example would determine whether a selected annotation
    'line or hollow rectangle is opaque or transparent and
    'would allow that attribute to be changed.  The form used
    'would have 2 option buttons -- one labeled "Opaque" and one
    'labeled "Transparent".
    Dim LineStyle As AnnotationStyleConstants

    'Determine if the selected line annotation is opaque or
    'transparent and set the corresponding option button on
    'the form.
    LineStyle = frmMain.ImgEdit1.GetSelectedAnnotationLineStyle
    If LineStyle = wiOpaque Then
      optOpaque.Value = True
    Else
      optTransparent.Value = True
    End If
    
    frmLineStyle.Show
   
End Sub

Private Sub optOpaque_Click()
    'If the user clicks on the Opaque option button the annotation
    'is changed to be opaque.
     
    frmMain.ImgEdit1.SetSelectedAnnotationLineStyle wiOpaque
   
End Sub

Private Sub optTransparent_Click()
    'If the user clicks on the Transparent option button the annotation
    'is changed to be transparent.
    frmMain.ImgEdit1.SetSelectedAnnotationLineStyle wiTransparent
End Sub