Using annotationManager As AnnotationManager = New AnnotationManager()
If (annotationManager.InitFromFile("annots.jpeg") = GdPictureStatus.OK) AndAlso
(annotationManager.PageCount > 0) AndAlso (annotationManager.SelectPage(1) = GdPictureStatus.OK) Then
Dim message As String = "Done!" + vbCrLf
Dim annots As GdPicture14.Annotations.Annotation() = annotationManager.GetOrderedAnnotations()
If annotationManager.GetStat() = GdPictureStatus.OK Then
For i As Integer = 0 To annots.Count() - 1
message += annots(i).GetType().ToString() + " Z: " + annots(i).Zorder + vbCrLf
'Or you can change the annotations Z-order here as you need.
Next
MessageBox.Show(message, "AnnotationManager.GetOrderedAnnotations")
Else
MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.GetOrderedAnnotations")
End If
Else
MessageBox.Show("The AnnotationManager can't be properly initialized. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.GetOrderedAnnotations")
End If
End Using
using (AnnotationManager annotationManager = new AnnotationManager())
{
if ((annotationManager.InitFromFile("annots.jpeg") == GdPictureStatus.OK) &&
(annotationManager.PageCount > 0) && (annotationManager.SelectPage(1) == GdPictureStatus.OK))
{
string message = "Done!\n";
GdPicture14.Annotations.Annotation[] annots = annotationManager.GetOrderedAnnotations();
if (annotationManager.GetStat() == GdPictureStatus.OK)
{
for (int i = 0; i < annots.Count(); i++)
{
message += annots[i].GetType() + " Z: " + annots[i].Zorder + "\n";
//Or you can change the annotations Z - order here as you need.
}
MessageBox.Show(message, "AnnotationManager.GetOrderedAnnotations");
}
else
MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.GetOrderedAnnotations");
}
else
MessageBox.Show("The AnnotationManager can't be properly initialized. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.GetOrderedAnnotations");
}