The only way to do this is to create a class that owns and runs the thread.
The class will contain fields or properties that the thread updates and the
calling class will be able to interrogate those fields or properties when
the thread is done. Remember to use mutex to synchronize the access to the
fields within the class so that the thread and the UI thread don't clash.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Tee" <th*@streamyx.com> wrote in message
news:u1****************@TK2MSFTNGP10.phx.gbl...
Hi,
Can we use thread.start on a function that has return value?
I have a function that will take sometimes to run and it will return a
string value, and I want to use thread.start to call this function and get
the string, is this possible?
Thanks,
Tee