Viewer resize issue

Discussions about document viewing.
Post Reply
sbarlow
Posts: 31
Joined: Fri Jun 19, 2009 3:13 pm

Viewer resize issue

Post by sbarlow » Fri Dec 11, 2009 3:46 pm

Hi,

using vb.net, and this may have been discussed before but I could not find an answer in the forum

I have a form that is an MDI child that has a gdviewer control on it. I have anchored the control on all 4 sides so that it resizes with the form. If the viewer has a loaded image, and the form is resized I get a "unable to render this image error" .

I have also tried just anchoring top/left and then tried to resize via code in one of the forms resize events, but I still get the same error

Is there a way to resize the viewer when the form is resized?

User avatar
Loïc
Site Admin
Posts: 5720
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Viewer resize issue

Post by Loïc » Fri Dec 11, 2009 3:51 pm

Hi,

Could you attach a small app reproducing this problem ?

Kind regards,

Loïc

sbarlow
Posts: 31
Joined: Fri Jun 19, 2009 3:13 pm

Re: Viewer resize issue

Post by sbarlow » Fri Dec 11, 2009 4:38 pm

My fault, I just figured it out, I was releasing the image from gdpicture after loading the viewer (dumb on my part)

Code: Select all

  Dim ImageID As Integer = GDP.CreateGdPictureImageFromFile(filepath)
  GdViewer1.DisplayFromGdPictureImage(ImageID)
  GDP.ReleaseGdPictureImage(ImageID)  '<--- why I did this I have no idea, caused the issue

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests