'We assume that the GdViewer1 control has been properly integrated.
Private Sub buttonAddImageAnnot_Click(ByVal sender As Object, ByVal e As EventArgs)
Using image As GdPictureImaging = New GdPictureImaging()
Dim imageID As Integer = image.CreateGdPictureImageFromFile("image.jpg")
If image.GetStat() = GdPictureStatus.OK Then
GdViewer1.AddEmbeddedImageAnnotInteractive(imageID, True, Color.Coral, 0.1F, 0.75F)
If GdViewer1.GetStat() <> GdPictureStatus.OK Then MessageBox.Show("Error! Status: " + GdViewer1.GetStat().ToString(), "AddEmbeddedImageAnnotInteractive")
image.ReleaseGdPictureImage(imageID)
Else
MessageBox.Show("The requested image can't be created. Status: " + image.GetStat().ToString(), "AddEmbeddedImageAnnotInteractive")
End If
End Using
End Sub
//We assume that the GdViewer1 control has been properly integrated.
void buttonAddImageAnnot_Click(object sender, EventArgs e)
{
using (GdPictureImaging image = new GdPictureImaging())
{
int imageID = image.CreateGdPictureImageFromFile("image.jpg");
if (image.GetStat() == GdPictureStatus.OK)
{
GdViewer1.AddEmbeddedImageAnnotInteractive(imageID, true, Color.Coral, 0.1f, 0.75f);
if (GdViewer1.GetStat() != GdPictureStatus.OK)
MessageBox.Show("Error! Status: " + GdViewer1.GetStat().ToString(), "AddEmbeddedImageAnnotInteractive");
image.ReleaseGdPictureImage(imageID);
}
else
MessageBox.Show("The requested image can't be created. Status: " + image.GetStat().ToString(), "AddEmbeddedImageAnnotInteractive");
}
}