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
 problem with MouseWheelParams.Action:=iemwZoom

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
jrpcguru Posted - Feb 18 2013 : 17:13:15
I have just begun using ImageEn and like it so far. But I've found a puzzling problem:

I use the following code to load an image:
sFileName := OpenImageEnDialog1.FileName;
ImageEnView1.IO.LoadFromFile(sFileName);
After which I receive the default result from the mouse wheel of zooming the image.

If I then load another file using the same code, the mouse wheel no longer does anything. I've tried everything I could find on the web, the help file, and the eBook to force it to behave, but it simply ignores ImageEnView1.MouseWheelParams.Action:=iemwZoom;

I'm using Delphi XE2 and Win7 Pro.

The only thing I've found which restores the mousewheel zoom is acquiring an image from my scanner. But it is lost again as soon as I use LoadFromFile.


J.R.
4   L A T E S T    R E P L I E S    (Newest First)
jrpcguru Posted - Feb 28 2013 : 08:56:45
I can confirm that a simple program such as you suggest does work correctly. That leaves me wondering what weird conflicts exist in my program. But I gave up and moved on. I was able to create the desired zoom via mousewheel by using the MouseWheel event, so I did not lose by giving up.
Thanks for the reply.

J.R.
fab Posted - Feb 27 2013 : 01:51:46
I'm sorry, I still cannot replicate. Please send a sample application.
I put a TImageEnView and a button on the form, then handled button click with:

  ImageEnView1.MouseWheelParams.Action := iemwZoom;
  if OpenImageEnDialog1.Execute then
    begin
      ImageEnView1.IO.LoadFromFile(OpenImageEnDialog1.FileName);
      ImageEnView1.setfocus;
    end;


It works, tested on Delphi XE2 and Win 7.
jrpcguru Posted - Feb 21 2013 : 09:34:45
if OpenImageEnDialog1.Execute then
    begin
      ImageEnview1.SetFocus();
      ImageFileName := OpenImageEnDialog1.FileName;
      ImageEnView1.IO.LoadFromFile(ImageFileName);
//showmessage('just loaded');

      ImageEnView1.setfocus;
    end;


I had already tried setting focus after loading. I've now tried setting focus before as you suggested, but no change. One thing I forgot to mention in my original question: If I use a showmessage() after loading, I don't lose the scroll wheel for zooming. That usually suggests a timing issue so I tried up to a 2 second pause which didn't work.

J.R.
fab Posted - Feb 20 2013 : 15:02:06
I cannot replicate. Perhaps ImageEnView has lost focus?
Please try:

ImageEnView1.SetFocus();

...just after OpenImageEnDialgo1.Execute() returns.