interrupt mousemove

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fu Chen

    #1

    interrupt mousemove

    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!!
  • Jason Smith

    #2
    Re: interrupt mousemove

    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.

    "Fu Chen" <novalet@yahoo. com.cn> wrote in message
    news:46c1ab97.0 309202101.5d5d9 c01@posting.goo gle.com...[color=blue]
    > 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!![/color]


    Comment

    Working...