ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 SaveImageEnDialog
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

John

USA
94 Posts

Posted - Jan 20 2012 :  13:15:41  Show Profile  Reply
Hello

Windows 7 64 bit, Delphi XE, ImageEn 4.0.2

Utilizing the bare bones code below I have three questions:
1. after the save dialog is displayed, the zoom component in the upper right hand corner has a default value of "Fit" but the preveiw image on the right side of the dialog does not display unless the zoom drop down list is expanded and then closed. Is there a function that I can call from code to automatically perform the OnClose action on the zoom component so that the preview will automatically be displayed for the user?

2. It does not appear to me that the last line of code returns a boolean value defining whether the file save was actually successful. Is there a mechanism to do so?

3. If I save over an existing file name I receive a "Confirm Save As" error message. Is there a mechanism to capture the results of this message as either a boolean or integer value?

TIA

John


SaveImageEnDialog.InitialDir := tempPtXrayPath;

SaveImageEnDialog.Options := [ofOverwritePrompt, ofFileMustExist,
ofPathMustExist, ofNoNetworkButton, ofNoDereferenceLinks];

SaveImageEnDialog.FileName := tempPtXrayPath + tempFileName;

ImageEnView1.IO.SaveToFile( SaveImageEnDialog.FileName );

xequte

39053 Posts

Posted - Jan 20 2012 :  22:01:40  Show Profile  Reply
Hi John

1. I will investigate that

2. Wrap your save in a try except block

bSavedOK := True;
Try
ImageEnView1.IO.SaveToFile( SaveImageEnDialog.FileName );
except
bSavedOK := False;
end;

3. No, not at this time.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

John

USA
94 Posts

Posted - Jan 22 2012 :  11:21:40  Show Profile  Reply
Nigel

Thanks for the reply

John
Go to Top of Page

xequte

39053 Posts

Posted - Jan 30 2012 :  20:41:32  Show Profile  Reply
Hi John

I can't reproduce item #1, what version of Delphi and Windows are you using?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

John

USA
94 Posts

Posted - Jan 31 2012 :  07:42:14  Show Profile  Reply
Xequte

I am using Windows 7, 64 bit, Delphi XE and ImageEn 4.0.2.

In this specific scenario, I am saving a modified file and overwriting the original file. This orignal file is located in a directory with other *.jpg files. As a result, there are multiple images visible when the save dialog is displayed. Although the file name property of the save dialog is correctly populated, a specific image is not selected. Hence no image is displayed in the preview component of the save dialog.

Since I can obviously populate the SaveImageEnDialog.FileName, is there a mechanism in code to select the specific image associated with the entered file name, prior to displaying the save dialog? The result being that when the save dialog is displayed, the image associated with the FileName property is already selected and will be automatically displayed in the preview component?

TIA

John

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: