Page 1 of 1

Transfer content from one GdViewer to another

Posted: Fri Aug 05, 2011 3:43 pm
by JensN
We are new to GdPicture and looking for a way to transfer the content from one GdViewer to another.
Both viewers are located on different forms. In the background we are working with GdPictureImaging form which the GdViewer loads the images.
We already found a way by transferring the ImageID from the first Viewer and than call CreateClonedPictureFromImage(ImageID) on the other.
The problem is that we have to transfer single and multipage images and the aformentioned approach only works for single pages images.

Thanks in Advance!

Jens

Re: Transfer content from one GdViewer to another

Posted: Sat Aug 06, 2011 2:57 am
by Loïc
Hi,

Just open your image using a GdPictureImaging object that returns an Image identifier.

Then use this image identifier as parameter of the DisplayFromGdPictureImage() method of both GdViewer components.

IE:

Code: Select all

int ImageID = oGdPictureImaging.CreateGdPictureImageFromFile("");
GdViewer1.DisplayFromGdPictureImage(ImageID);
GdViewer2.DisplayFromGdPictureImage(ImageID);
Hope this helps !

Re: Transfer content from one GdViewer to another

Posted: Sat Aug 06, 2011 4:32 pm
by JensN
Hi Loïc,

Thanks for your help! It works fine now.

Jens