'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
'Add the event.
AddHandler GdViewer1.AnnotationStartEditingText, AddressOf GdViewer1_AnnotationStartEditingText
'Define the event.
Sub GdViewer1_AnnotationStartEditingText(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationStartEditingText
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.AnnotationStartEditingText")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
//Add the event.
GdViewer1.AnnotationStartEditingText += GdViewer1_AnnotationStartEditingText;
//Define the event.
void GdViewer1_AnnotationStartEditingText(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.AnnotationStartEditingText");
}