Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thread question + sleep method 1

Status
Not open for further replies.

Zoilus

Programmer
Jun 19, 2001
5
CA
Hi,

I have a thread that needs some components from the Form it was called by. I thought of creating a new method Create that would require in his parameters these components, and then set them so I can use them in my thread (I suspect there is a better way to do it). But, when I change the Create method, the Execute method is never called... any idea why?

Also, I did some testing, and when I start a thread with a call to the Sleep method, even my main program sleeps... any idea how to fix this?
 
Are you calling inherited Create in your constructor?

TealWren
 
Hmm... no.

How can I do this (I know how to do this in java, but it's not really useful here ;)
 
in your new constructor, just call

inherited Create(False);

(the false is for the createSuspended parameter - if you want it created suspended then put true instead!

TealWren
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top