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
 Checking for Modified

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
lmiller@rescorsoft.com Posted - Jan 11 2014 : 09:36:38
Is there a Modified (or something similar) property of either TImageEnDBView or TImageEnView? What I would like to do in the FormClose insert something like:

if edtPhoto.Modifed then begin
Ask User if they want to save changes
if Yes then
Post Changes
else
Cancel Changes
end

TIA
Luke
1   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Jan 11 2014 : 09:49:09
If LegacyBitmap is true then you can access the ImageEnView.Bitmap.Modified property.

The ImageEnView.Bitmap.Modified property is not automatically set when the bitmap changes so you have to do that manually in code:
ImageEnView.Proc.ConvertToGray;
ImageEnView.Bitmap.Modified := True;

Also...
ImageEnView.Bitmap.Modified := ImageEnView.Proc.CanUndo;

If LegacyBitmap is false then there is no ImageEnView.Bitmap so there is no ImageEnView.Bitmap.Modified property. In this case just create your own global boolean variable AModified: boolean, and use that to track if the image has been modified.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html