MouseMove sensibility

Posted by serhio on Stack Overflow See other posts from Stack Overflow or by serhio
Published on 2010-03-22T21:25:31Z Indexed on 2010/03/22 21:41 UTC
Read the original article Hit count: 432

Filed under:
|
|
|

I use MouseMove event to move objects(say labels).

simple principle(schematic):

OnMouseMove(e MouseEventArgs)
    deltaX = e.X - lastX
    foreach label in labels
        label.Location.X += deltaX
    lastX = e.X

Now, when I have one label there is no problem.

Once the labels number increase, I start to see the labels traces along the moving trajectory.

Is there a way to prevent this kind of traces?

tried

label.Visible = false
label.Location.X += deltaX
label.Visible = true

does not help.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about winforms