'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
Dim left As Integer = 0, top As Integer = 0, width As Integer = 0, height As Integer = 0
GdViewer1.GetDisplayedArea(left, top, width, height)
If GdViewer1.CopyRegionToClipboard(left, top, width, height) = GdPictureStatus.OK Then
MessageBox.Show("Done!", "GdViewer.GetDisplayedArea")
Else
MessageBox.Show("The page content can't be copied. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.GetDisplayedArea")
End If
Else
MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.GetDisplayedArea")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
int left = 0, top = 0, width = 0, height = 0;
GdViewer1.GetDisplayedArea(ref left, ref top, ref width, ref height);
if (GdViewer1.CopyRegionToClipboard(left, top, width, height) == GdPictureStatus.OK)
{
MessageBox.Show("Done!", "GdViewer.GetDisplayedArea");
}
else MessageBox.Show("The page content can't be copied. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.GetDisplayedArea");
}
else
MessageBox.Show("The file can't be displayed. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.GetDisplayedArea");