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
 fit image in oncreate form event don't work
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

apresa

Spain
5 Posts

Posted - Mar 09 2018 :  06:15:20  Show Profile  Reply
Hello all

I try fit image in oncreate form event with this code, but don't work :


Twndimagen.FormCreate(Sender: TObject);
begin
   imagenvisor.Fit;
end;


I try fit and not autofit since I want to have the zoom levels with the mouse interact.

TIA

Alfonso

xequte

39056 Posts

Posted - Mar 09 2018 :  23:58:48  Show Profile  Reply
Hi Alfonso

The Fit command can only be used *after* you have loaded an image. Also, the handle may not yet be available in OnCreate. Try using OnShow.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

apresa

Spain
5 Posts

Posted - Mar 10 2018 :  03:56:12  Show Profile  Reply
Hi Nigel:

I try with:

procedure Twndimagen.FormCreate(Sender: TObject);
begin
  
   // imagen.Fit(); 
   imagenvisor.Assign(imagen);
   imagenvisor.Fit;
end;


and don't work.

Image it's load but don't fit.

Alfonso
Go to Top of Page

xequte

39056 Posts

Posted - Mar 11 2018 :  18:31:07  Show Profile  Reply
Hi Alfons

The handle may not yet be available in OnCreate. Try using OnShow.



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