c# - Winform Customer ListBox How to Suspend OnPaint method -


i have custom listbox inherits winforms listbox class, so.

  public class userlistbox : listbox   {              protected override void onpaint(painteventargs e)      {          // omitted brevity...      }   } 

i add filter on listbox (just gridview control's defaultview) when change items, onpaint method called regardless. cannot call other method remove.

i test sendmessage wm_setredraw suspend update, isn't working.

how can suspend call onpaint method?

original

i'm not sure why ever want this, possible. winforms can p/invoke native calls , attempt manage things windows messaging loop. in honesty, suggest trying avoid doing this. you're trying accomplish?

how can suspend control.onpaint method?

follow link check out example.

update

according msdn documentation, you're doing correctly. please provide more source code such have look?


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -