'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
'Add the event.
AddHandler GdViewer1.AnnotationSelected, AddressOf GdViewer1_AnnotationSelected
'Define the event.
Sub GdViewer1_AnnotationSelected(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationSelected
Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(AnnotationIdx)
If annot.Selected Then
MessageBox.Show("The annotation with the index " + AnnotationIdx.ToString() + " has been selected.", "GdViewer.AnnotationSelected")
Else
MessageBox.Show("The annotation with the index " + AnnotationIdx.ToString() + " has been deselected.", "GdViewer.AnnotationSelected")
End If
End Sub
//We assume that the GdViewer1 control has been properly integrated.
//Add the event.
GdViewer1.AnnotationSelected += GdViewer1_AnnotationSelected;
//Define the event.
void GdViewer1_AnnotationSelected(int AnnotationIdx)
{
GdPicture14.Annotations.Annotation annot = GdViewer1.GetAnnotationFromIdx(AnnotationIdx);
if (annot.Selected)
MessageBox.Show("The annotation with the index " + AnnotationIdx.ToString() + " has been selected.", "GdViewer.AnnotationSelected");
else
MessageBox.Show("The annotation with the index " + AnnotationIdx.ToString() + " has been deselected.", "GdViewer.AnnotationSelected");
}