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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 SaveImageEnDialog

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
John Posted - Jan 20 2012 : 13:15:41
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 );
4   L A T E S T    R E P L I E S    (Newest First)
John Posted - Jan 31 2012 : 07:42:14
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

xequte Posted - Jan 30 2012 : 20:41:32
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
John Posted - Jan 22 2012 : 11:21:40
Nigel

Thanks for the reply

John
xequte Posted - Jan 20 2012 : 22:01:40
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