'We assume that the GdViewer1 control has been properly integrated.
Dim annotCount As Integer = GdViewer1.GetAnnotationCount()
'Use the GetStat() method here to find the reason for the failure.
Dim status As GdPictureStatus = GdViewer1.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("The number of annotations: " + annotCount.ToString(), "GdViewer.GetStat")
Else
MessageBox.Show("The GetAnnotationCount() method has failed with the status: " + status.ToString(), "GdViewer.GetStat")
End If
//We assume that the GdViewer1 control has been properly integrated.
int annotCount = GdViewer1.GetAnnotationCount();
//Use the GetStat() method here to find the reason for the failure.
GdPictureStatus status = GdViewer1.GetStat();
if (status == GdPictureStatus.OK)
{
MessageBox.Show("The number of annotations: " + annotCount.ToString(), "GdViewer.GetStat");
}
else
{
MessageBox.Show("The GetAnnotationCount() method has failed with the status: " + status.ToString(), "GdViewer.GetStat");
}