'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Dim annotIdx As Integer = GdViewer1.GetSelectedAnnotationIdx()
If annotIdx >= 0 Then
Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(annotIdx)
If GdViewer1.GetStat() <> GdPictureStatus.OK Then Throw New IndexOutOfRangeException()
MessageBox.Show("The index of the selected annotation is: " + annotIdx + vbCrLf +
" Author: " + annot.Author + " Created: " + annot.CreationTime.ToString() + " Subject: " + annot.Subject, "GdViewer.GetSelectedAnnotationIdx")
Else
MessageBox.Show("No annotation is currently selected.", "GdViewer.GetSelectedAnnotationIdx")
End If
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
int annotIdx = GdViewer1.GetSelectedAnnotationIdx();
if (annotIdx >= 0)
{
GdPicture14.Annotations.Annotation annot = GdViewer1.GetAnnotationFromIdx(annotIdx);
if (GdViewer1.GetStat() != GdPictureStatus.OK) throw new IndexOutOfRangeException();
MessageBox.Show("The index of the selected annotation is: " + annotIdx +
"\n Author: " + annot.Author + " Created: " + annot.CreationTime + " Subject: " + annot.Subject, "GdViewer.GetSelectedAnnotationIdx");
}
else
{
MessageBox.Show("No annotation is currently selected.", "GdViewer.GetSelectedAnnotationIdx");
}