Avoid Flickering in listview
-
hi all, I have a listview where i am trying to display thumbnail images similar to windows explorer. i have set the owner draw property to true and i managed to display the thumbnails using the drawitem event. But when i execute my application there seems to be a flickering in listing of images. i found many samples illustrating to set the doublebuffered property to true. and use setstyles property. public mylistview() { //Activate double buffering this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); //Enable the OnNotifyMessage event so we get a chance to filter out // Windows messages before they get to the form's WndProc this.SetStyle(ControlStyles.EnableNotifyMessage, true); this.DoubleBuffered = true; } protected override void OnNotifyMessage(Message m) { //Filter out the WM_ERASEBKGND message if (m.Msg != 0x14) { base.OnNotifyMessage(m); } } but still the flickering occurs. i found a article Flickerfree listview here^ but that does not seem to work perfectly. Can anyone help me with some links or suggestions??
Thanks in advance.:) Regards Anuradha