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
 Disabling mouse inteactions on smoothzoom progress
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kturkay

9 Posts

Posted - May 19 2020 :  02:59:03  Show Profile  Reply
Hi!,

after some hours of digging and attemption many different possibilities,
I feel gotto ask that question.
I mean SetZoomSmooth progression.

I could not stop mouse clicks or whell events
while smoothzoom is in progress.

I think Imageenvect vcl overrides one of onmessage events or so..
Imageenvect1.enabled:=false; also not helped,control still stops the smoothzoom progress on any click actions.

trying to stop any mouse actions while smoothzoom is not triggered the onfinishsmoothzoom event.
disabling whole form or imageenvcl not helped also intrecepting onmessage not helped.

imageenvect1.MouseInteractVt := [];
imageenvect1.MouseInteractGeneral := [];
imageenvect1.LayerOptions := [];
imageenvect1.MouseInteractLayers := [];
imageenvect1.Enabled := false;
not helped

the last I try, totally disabling mouse on system wide.
procedure BlockInput(ABlockInput: Boolean); stdcall; external 'USER32.DLL';
BlockInput(true);//disable mouse
in OnFinishSmoothZoom event
BlockInput(false);//reenable mouse
that worked but seems tricky and seems mouse freeze temporary.

not an urgent help needed. just I wanna know:
is there a better way to stop mouse actions while smoothzoom in progress ?

I tried that one but imageen control still receives clicks and stops smooth zoom:
https://stackoverflow.com/questions/24332827/delphi-disable-mouse-buttons-and-enable-again

a demo to reproduce the question. image,description and codes are ready to test:

https://tr.im/SmoothZoomProblem
(thanks in advance)

kturkay

9 Posts

Posted - May 19 2020 :  11:01:07  Show Profile  Reply
okay I found a solution. reporting here:
it seems SetZoomSmooth is always interruptable.
instead of using setsmoothzoom
I put a timer.
changing zoom value manually
disabling imageen control when timer triggers. MouseWheelParams.Action to none;
and when zoom value reach the spesific value (finished) stopping timer and enabling control again. by this way it seems zoom progress is not interruptable.

-we love Imageen-
Go to Top of Page

xequte

5227 Posts

Posted - May 20 2020 :  00:02:04  Show Profile  Reply
Hi

It is by design that ImageEn halts smooth zooming when you interact so you can commence working on it.

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

kturkay

9 Posts

Posted - May 20 2020 :  01:21:37  Show Profile  Reply
ah! found that bug. was my fault.
I accidently uncommented a line which interrupts the smoothzoom progression.

Mouse_Event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);//should be commented/removed
SendMessage(Iv.Handle, WM_LBUTTONDOWN, 0, MAKELPARAM(X, Y));

ups
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: