interrupt mousemove

  • Thread starter Thread starter Fu Chen
  • Start date Start date
F

Fu Chen

Hi!
I am designing a graphics editor in c#. I face a trouble, if i drag a
complex graphics item, it will be impossible to draw it once between
two movemove event. But in normal solution, movemove event processed
one by one, then it will be long delay before the graphics show on the
place mouse cursor on for the program will first draw it on several
useless places where mouse moved before. Is there any solution in
dotnet to peek the message? If a new mousemove message arrived, the
program should abandon the work it is doing and redraw on new place.
I think it is the same when we move the scrollbar.
Any idea or demo?
Thanks!!
 
Maybe try drawing from a separate thread? That would give you the ability
to easily interrupt the process. You may want to redraw into a buffer
(offscreen) and blit though, and that might make the whole thing a lot
faster. Once you get the picture into a buffer, you should be able to blit
from there as you drag.
 
Back
Top