|
-
Jan 26th, 2012, 09:02 PM
#7
Re: populate ListView using a thread
 Originally Posted by moeur
The nice thing about BeginInvoke is that it performs the action asynchronously (so it must run on a separate thread)
Here's the definition of the BeginInvoke method from the MSDN documentation:
Executes a delegate asynchronously on the thread that the control's underlying handle was created on.
That makes sense because it's the whole point of an invocation: to execute a method on the thread that owns the control. If your HandleCreated event handler is executed on the UI thread (which I assume that it is, although I haven't tested it to make sure) then how can BeginInvoke execute a method on a different thread if it is delegating to the thread that owns the ListView, which is the UI thread?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|