Link to home
Start Free TrialLog in
Avatar of __alex
__alex

asked on

Disable mouse events while maximizing/minimizing

I use the OnMouseDown, OnMouseMove and OnMouseUp events to draw lines on a TImage. If I maximize/minimize the form it happens that an OnMouseMove event is fired without a corresponding OnMouseDown etc.
Is there a way to disable the events before resizing and enable them after resizing has finished?

Thanks!
Avatar of Colin_Dawson
Colin_Dawson

You could add a little extra code to see if the position of the event is within the canvas of the TImage.  It should have the same effect.
ASKER CERTIFIED SOLUTION
Avatar of LRHGuy
LRHGuy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of __alex

ASKER

Awesome, thanks!