|
-
Apr 14th, 2005, 04:21 PM
#1
Thread Starter
Fanatic Member
[resolved] .Invoke, Threads, and OnPaint method
When I create a delegate sub and then point it at another sub that has the same signature, then use the .Invoke method, does it create a new thread for runing that sub?
Basically, my paint code is long and involved. It uses a for...next loop to loop through a collection of 'elements' and draw each of the visible ones individually.
I was wondering if there was an easy way to put that in it's own thread so the ui doesn't lock up (just slow down) when there's a huge number of 'elements'
I was also wondering if creting a delegat sub was the correct way of doing that.
This is all being performed in the OnPaint method of the class I'm working on and it needs to pass arguments to the thread.
Any ideas?
Last edited by agent; Apr 28th, 2005 at 04:24 PM.
Reason: resolved
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
|