I have a control that the user can change with the mouse. When they move on the right side, I just change the width and everything works fine.
However, when they move the left size, I need to change the Left and Width properties. The right side of the control twitches noticeably, showing the old width in the new position.
It still twitches if I set both left and width at the same time using Bounds; regardless of whether I use SetStyle with any parameters UserPaint, Opaque, OptimizedDoubleBuffer, AllPaintingInWmPaint or ResizeRedraw; and whether or not this is double buffered. It still twitches if I call SuspendLayout () / ResumeLayout () either in the control or in its parent.
How to stop controls from twitching when changing their left positions and their width?
Simon source share