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
 TImageEnMIO vs. TImageEnMView.MIO
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Elemental

USA
56 Posts

Posted - Mar 31 2014 :  12:37:22  Show Profile  Reply
I have a TImageEnMView and a TImageEnMIO on my form, connected to each other through the AttachedMView property. I've noticed in my code that sometimes I use the TImageEnMIO component and sometimes I use the MIO property of the TImageEnMView component. Are they, in fact, interchangeable? Does it matter which one I use in code? By setting properties on one, am I really doing it to the other?

w2m

USA
1990 Posts

Posted - Mar 31 2014 :  13:16:10  Show Profile  Reply
Yes they are inter-changeable as long as they are connected. But why even use the TImagEnMIO component when it is already built into TImageEnMView? It is not necessary to use TImageEnMIO at all. If fact, nearly all the time I always use TImageEnMView.MIO... The same is true for TImageEnMView.Proc and TImageEnProc.

Generally I use TImageEnMIO by itself, not attached, to be able to load and access an image without it appearing in TImageEnMView.

The same this is also true for TImageEnView or TImageEnVect with respect to TImageENIO and TImageEnProc with either of these components.

In the long run it is better not to use an attached ImasgeEnMIO or an attached TImageEnProc, because your code will be easier to understand.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development
Go to Top of Page

Elemental

USA
56 Posts

Posted - Mar 31 2014 :  13:19:43  Show Profile  Reply
The reason I use a TImageEnMIO at all is because I can handle the OnAcquireBitmap event. I suppose if I want to handle the OnProgress event I can handle the multi-view's OnIOProgress event.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 31 2014 :  13:41:45  Show Profile  Reply
I think you can use other TImageEnMView events to do this as well like:
TImageEnMView.OnCreateImage

Declaration
property OnCreateImage: TIECreateImageEvent;

Description
Occurs whenever (immediately after) a new image is created (i.e. whenever a new image is added to the TImageEnMView).

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

Go to Top of Page

xequte

38608 Posts

Posted - Apr 01 2014 :  00:17:38  Show Profile  Reply
As Bill described, for all visual stuff you would use TImageEnMView.MIO. TImageEnMIO is only used directly if you need non-visual functionality.

You can assign your OnAcquireBitmap event at run time:

procedure Tfmain.FormCreate(Sender: TObject);
begin
  ImageEnMView1.MIO.OnAcquireBitmap := MyAcquireBitmapEvent;
end;


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

w2m

USA
1990 Posts

Posted - Apr 01 2014 :  09:05:03  Show Profile  Reply
@Nigel

FYI...

ImageEnMView1.MIO.OnAcquireBitmap event is not in the help file.

William Miller
Go to Top of Page

xequte

38608 Posts

Posted - Apr 01 2014 :  13:22:38  Show Profile  Reply
Hi William

It should be under the events heading:

http://www.imageen.com/help/TImageEnMIO.html



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

w2m

USA
1990 Posts

Posted - Apr 01 2014 :  13:44:08  Show Profile  Reply
Yes on line but not in the help file itself for TImageEnMView events... I guess it is easy to get confused where to find it.

William Miller
Go to Top of Page

xequte

38608 Posts

Posted - Apr 01 2014 :  15:08:53  Show Profile  Reply
Hmmm, yes, I will add a OnAcquireBitmap event to TImageEnView and TImageEnMView

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: