Loading...

Preview file with gdViewer lock files....

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Preview file with gdViewer lock files....

Postby sarzan » Fri Sep 07, 2007 2:24 pm

I m using version 3,9005 of gdViewer (included in gdPicture Pro control).

When i use the .DisplayFromFile method the source file is locked. Other application can access it read only.
And more.. if i close the application without close the picture first (using .closepicture or .close2picture method) the file remain locked until the system reboot (this is a critical issue).

I try this simple workaround:
Code: Select all
gdViewer1.DisplayFromFile (sTmpFile)
gdViewer1.Close2Picture


In this way the file don't lock and the picture still display on gdViewer, BUT i can do any action on it like setting the zoom factor (es. .ZoomMode = ZoomToViewer produce no effect).

There is a way to load the image in the viewer, release the file, and menage it ?
sarzan
 
Posts: 25
Joined: Thu Jul 05, 2007 12:07 pm
Location: Florence - Italy

Postby Loïc » Sun Sep 09, 2007 11:11 pm

Hi Sarzan,

When i use the .DisplayFromFile method the source file is locked


You can switch the ImageForceTemporaryMode property to True to keep the source file unlocked.


if i close the application without close the picture first (using .closepicture or .close2picture method) the file remain locked until the system reboot (this is a critical issue).


Into the next release, all the images opened & created by the GdViewer and the cGdPicture classes will be removed automatically on the application shutdown.


Code: Select all
There is a way to load the image in the viewer, release the file, and menage it ?


Yes, you can do that using the GdPicture Pro component like that:

Code: Select all
Dim oGdPicture as new GdPicturePro.cGdPicture
dim nNewImageHandle as long

nNewImageHandle = oGdPicture.CreateClonedImageI(GdViewer1.GetNativeImage())
GdViewer1.ClosePicture()
GdViewer1.SetNativeImage(nNewImageHandle)



Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest