Windows Forms Flickering
-
I have a C# Windows Forms app in which there are a number of Panels containing standard controls like PictureBox'es, Buttons and Labels. At runtime, I allow the user to drag-and-move the panels to reposition them where he/she likes. I programmed my own drag-around logic using MouseDown, MouseMove, and MouseUp. While the user drags the Panels around, there is considerable unpleasant flickering. Where does the flickering come from? Anything I can do to eliminate it? THANKS! Mark
-
I have a C# Windows Forms app in which there are a number of Panels containing standard controls like PictureBox'es, Buttons and Labels. At runtime, I allow the user to drag-and-move the panels to reposition them where he/she likes. I programmed my own drag-around logic using MouseDown, MouseMove, and MouseUp. While the user drags the Panels around, there is considerable unpleasant flickering. Where does the flickering come from? Anything I can do to eliminate it? THANKS! Mark
Does
LockWindowUpdate()
[^] help? You may need to P/Invoke it. /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
I have a C# Windows Forms app in which there are a number of Panels containing standard controls like PictureBox'es, Buttons and Labels. At runtime, I allow the user to drag-and-move the panels to reposition them where he/she likes. I programmed my own drag-around logic using MouseDown, MouseMove, and MouseUp. While the user drags the Panels around, there is considerable unpleasant flickering. Where does the flickering come from? Anything I can do to eliminate it? THANKS! Mark
Also try using
Suspend/ResumeLayout()
on the panel at the start/end of the drag operation. These are native .NET APIs (onControl
). Hope this helps. /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
I have a C# Windows Forms app in which there are a number of Panels containing standard controls like PictureBox'es, Buttons and Labels. At runtime, I allow the user to drag-and-move the panels to reposition them where he/she likes. I programmed my own drag-around logic using MouseDown, MouseMove, and MouseUp. While the user drags the Panels around, there is considerable unpleasant flickering. Where does the flickering come from? Anything I can do to eliminate it? THANKS! Mark