treeview - Whats the best way to do throbber in C#? -


specifically looking make icons nodes in system.windows.forms.treeview control throb while long loading operation taking place.

if load each frame imagelist, can use loop update each frame. example:

    bool runthrobber = true;     private void animatethrobber(treenode animatednode)     {         backgroundworker bg = new backgroundworker();         bg.dowork += new doworkeventhandler(delegate         {             while (runthrobber)             {                 this.invoke((methodinvoker)delegate                 {                     animatednode.selectedimageindex++;                     if (animatednode.selectedimageindex >= imagelist1.images.count) > animatednode.selectedimageindex = 0;                 });                 thread.sleep(100);             }         });         bg.runworkerasync();     } 

obviously there's more few ways implement this, here's basic idea.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -