StrataFrame Forum

Doevents...

http://forum.strataframe.net/Topic7276.aspx

By StarkMike - 3/2/2007

I've heard that using DoEvents is a bad practice but when I'm in a loop and adding items to say a listview its the only thing i know of that refreshes the listview so i can see the progress.



Any advice?
By StrataFrame Team - 3/2/2007

You can get the list to repaint by using BeginUpdate and EndUpdate.  That's your best bet.  Call BeginUpdate when you want to start the process, and then call EndUpdate() when you want the list to refresh... just remember to call BeginUpdate again before you continue along your loop.