GetSelectedAnnotationFillStyle Example VB

This example uses the GetSelectedAnnotationFillStyle method to determine whether a selected image or filled rectangle annotation is opaque or transparent, and the SetSelectedAnnotationFillStyle method to change the fill style.

    'Private Sub Form_Load()
    'This example would determine whether a selected annotation
    'image or filled 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 FillStyle As AnnotationStyleConstants

    'Determine if the selected image annotation is opaque or
    'transparent and set the corresponding option button on
    'the form.
    FillStyle = frmMain.ImgEdit1.GetSelectedAnnotationFillStyle
    If FillStyle = wiOpaque Then
      optOpaque.Value = True
    Else
      optTransparent.Value = True
    End If
    
    frmFillStyle.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.SetSelectedAnnotationFillStyle wiOpaque
   
End Sub