'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
'Add the event.
AddHandler GdViewer1.AnnotationEndEditingText, AddressOf GdViewer1_AnnotationEndEditingText
'Define the event.
Sub GdViewer1_AnnotationEndEditingText(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationEndEditingText
Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(AnnotationIdx)
Dim text As String = ""
If TypeOf annot Is GdPicture14.Annotations.AnnotationStickyNote Then
text = (CType(annot, GdPicture14.Annotations.AnnotationStickyNote)).Text
ElseIf TypeOf annot Is GdPicture14.Annotations.AnnotationText Then
text = (CType(annot, GdPicture14.Annotations.AnnotationText)).Text
End If
MessageBox.Show(text, "GdViewer.AnnotationEndEditingText")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
//Add the event.
GdViewer1.AnnotationEndEditingText += GdViewer1_AnnotationEndEditingText;
//Define the event.
void GdViewer1_AnnotationEndEditingText(int AnnotationIdx)
{
GdPicture14.Annotations.Annotation annot = GdViewer1.GetAnnotationFromIdx(AnnotationIdx);
string text = "";
if (annot is GdPicture14.Annotations.AnnotationStickyNote)
text = ((GdPicture14.Annotations.AnnotationStickyNote)annot).Text;
else if (annot is GdPicture14.Annotations.AnnotationText)
text = ((GdPicture14.Annotations.AnnotationText)annot).Text;
MessageBox.Show(text, "GdViewer.AnnotationEndEditingText");
}