Move an image without flickering ?



Hi Experts:

My program (Windows Form with C# and .net 2.0) shows a bitmap (a bitmap file
selected by the user) and allows the user to drag it to different positions
within the client area. I use Graphics.Clear() and Graphics.DrawImage(...)
to repeatly clear the client area and re-draw the bitmap. The result is not
good because the visual flickering.

Is there a better way to move an bitmap smoothly?

Thanks In Advance!
Polaris


.



Relevant Pages

  • Re: Mouse messages in window border
    ... It depends on what you're trying to accomplish. ... During a drag it is acceptable when the ... unable to leave a window. ... Maybe I should just restrict the mouse to the client area ...
    (microsoft.public.vc.mfc)
  • Re: Move an image without flickering ?
    ... file selected by the user) and allows the user to drag it to different ... Graphics.DrawImageto repeatly clear the client area and re-draw the ... to exclude the area you have just drawn and then do Graphics.Clear. ... Some people here will probably suggest you turn on double buffering but this ...
    (microsoft.public.dotnet.languages.csharp)