I have a CheckedListBox (WinForms) control (which inherits from ListBox; googling shows that the problem is with ListBox) that is anchored to all four sides of its form. When t
This used to be handled by sending the WM_SETREDRAW message to the control.
const int WM_SETREDRAW = 0x0b;
Message m = Message.Create(yourlistbox.Handle, WM_SETREDRAW, (IntPtr) 0, (IntPtr) 0);
yourform.DefWndProc(ref m);
// do your updating or whatever else causes the flicker
Message m = Message.Create(yourlistbox.Handle, WM_SETREDRAW, (IntPtr) 1, (IntPtr) 0);
yourform.DefWndProc(ref m);
See also: WM_SETREDRAW reference at Microsoft Fixed Link
If anyone else has used windows messages under .NET, please update this posting as necessary.