Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
Generalslow listview refresh Pin
DF_Bandit15-Oct-04 6:49
DF_Bandit15-Oct-04 6:49 
GeneralRe: slow listview refresh Pin
Heath Stewart15-Oct-04 7:00
protectorHeath Stewart15-Oct-04 7:00 
GeneralRe: slow listview refresh Pin
DF_Bandit15-Oct-04 7:10
DF_Bandit15-Oct-04 7:10 
GeneralRe: slow listview refresh Pin
Heath Stewart15-Oct-04 8:44
protectorHeath Stewart15-Oct-04 8:44 
GeneralRe: slow listview refresh Pin
DF_Bandit15-Oct-04 9:39
DF_Bandit15-Oct-04 9:39 
GeneralRe: slow listview refresh Pin
Heath Stewart15-Oct-04 15:42
protectorHeath Stewart15-Oct-04 15:42 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 6:17
afinnell18-Oct-04 6:17 
GeneralRe: slow listview refresh Pin
Heath Stewart18-Oct-04 6:46
protectorHeath Stewart18-Oct-04 6:46 
Thread synchronization isn't a problem specific to .NET. Remember that most of the Windows Forms controls simply encapsulate the Windows Common Controls. This is a "problem" (actually, it makes a lot of sense if you understand threading in Windows; other platforms have these restrictions as well) with native threading.

To communicate with a control you must communicate with the control on the thread on which it was created. If you don't, undefined (i.e., unpredictable) results can happen. Some times you may not notice a problem. Other times it may appear to work but in actually you'll get memory leaks. Most times it just won't work.

If you'd rather batch your updates, then define your own method on your derivative ListView that, perhaps, takes an array or collection of ListViewItems. Gather X-number of ListViewItems then call Invoke using a delegate for the method defined above.

Like it or, at some point your UI will seem to lag but making your code effectient as possible won't be noticable - or at least as noticable - on most systems.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 7:50
afinnell18-Oct-04 7:50 
GeneralRe: slow listview refresh Pin
Heath Stewart18-Oct-04 10:06
protectorHeath Stewart18-Oct-04 10:06 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 11:11
afinnell18-Oct-04 11:11 
GeneralRe: slow listview refresh Pin
Heath Stewart18-Oct-04 11:41
protectorHeath Stewart18-Oct-04 11:41 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 12:03
afinnell18-Oct-04 12:03 
GeneralRe: slow listview refresh Pin
DF_Bandit18-Oct-04 8:16
DF_Bandit18-Oct-04 8:16 
GeneralSplitter & multiple panels Pin
DennisMetz15-Oct-04 6:47
DennisMetz15-Oct-04 6:47 
GeneralRe: Splitter & multiple panels Pin
Stanciu Vlad15-Oct-04 7:42
Stanciu Vlad15-Oct-04 7:42 
GeneralRe: Splitter & multiple panels Pin
DennisMetz15-Oct-04 8:14
DennisMetz15-Oct-04 8:14 
GeneralRe: Splitter & multiple panels Pin
Heath Stewart15-Oct-04 9:02
protectorHeath Stewart15-Oct-04 9:02 
GeneralRe: Splitter & multiple panels Pin
DennisMetz15-Oct-04 9:44
DennisMetz15-Oct-04 9:44 
GeneralLittle Help pls Pin
alphanorm15-Oct-04 6:31
alphanorm15-Oct-04 6:31 
GeneralRe: Little Help pls Pin
Brian Nottingham15-Oct-04 6:49
Brian Nottingham15-Oct-04 6:49 
GeneralRe: Little Help pls Pin
alphanorm15-Oct-04 6:55
alphanorm15-Oct-04 6:55 
GeneralDisplaying AOL .art file Pin
cgcrute15-Oct-04 5:05
cgcrute15-Oct-04 5:05 
GeneralRe: Displaying AOL .art file Pin
Heath Stewart15-Oct-04 6:26
protectorHeath Stewart15-Oct-04 6:26 
GeneralRe: Displaying AOL .art file Pin
cgcrute15-Oct-04 6:55
cgcrute15-Oct-04 6:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.