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
 Checking for Modified
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

lmiller@rescorsoft.com

USA
3 Posts

Posted - Jan 11 2014 :  09:36:38  Show Profile  Reply
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

w2m

USA
1990 Posts

Posted - Jan 11 2014 :  09:49:09  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: