Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi. i want to design the paint software. when press left click and move mouse, what event happen if stop move and left click be pressed too.please guide me.thanks
Posted
Comments
[no name] 27-Nov-12 0:21am    
Not clear..
Leila Mansouri 27-Nov-12 0:37am    
when i press left bottom of mouse, MouseDown event be called.
after this if i move mouse, MouseMove event be called.
after this, if i stop move, what event be called?
[no name] 27-Nov-12 0:38am    
On which control you are firing these events...??
Leila Mansouri 27-Nov-12 1:00am    
i want to draw paint in a user control. for this user control, i need event.
Sergey Alexandrovich Kryukov 27-Nov-12 0:45am    
No, event is not "called", because this is not a method. Even is invoked, and then all the event handlers are called, according to the invocation list found in the event instance. And, of course...
--SA

1 solution

Please see my comment to the question.

...and of course, there is no any event corresponding to the "stop" of the motion; and such event cannot exist in principle. By a very, very simple reason: mouse events are generated by a hardware driver, and there is no a hardware interrupt related to "stop" of the motion, and such interrupt cannot exist. And, in turn, this is so by a very, very simple reason: there cannot be a "good" criterion for such an event. This is just the lack of events for certain period of time.

Not just thinking that such even can exist, but the very desire of such facility is a huge misconception. Even if you had something similar, it would be really unusable. In principle, you could simulate something resembling such behavior using a timer. You could create an event invoked (please see my comment to the question again) by the timer event handler in case of absence of mouse even for certain period of time, if some mouse button is pressed. And now, imagine the nightmare the user would experience...

—SA
 
Share this answer
 
v2
Comments
[no name] 27-Nov-12 0:57am    
my 5+
Sergey Alexandrovich Kryukov 27-Nov-12 1:02am    
Thank you, Krunal.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900