Hi Bob,
Thanks for posting in the community.
First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you are confusing about the
example in MSDN help.(Setting a Thread Name (Managed))
I agree with Armin's suggestion that when the application start, the
program will run from the Sub Main(). in the third line in the Sub Main(),
the program will create a new thread, in the Line oThread.Start(), the
new created thread will start to run, it will run the Thread Procedure
Baz(), so the "MainThread" is the name of the new created thread, you can
specify its name to other string. The example is to demostrate how to set
the name of a new thread.
Usually, if you do not need to do multiple thread working, you do not need
to create the new thread. When the application starts to run, it will run
from a specified method(entry point, Startup Object), in this case, the
method is the Public Shared Sub Main() method.
A process can create one or more threads to execute a portion of the
program code associated with the process. The thread to run the Public
Shared Sub Main() will be created automatically, you do not need to create
it.
StartupObject Property
http://msdn.microsoft.com/library/de...us/vbcon/html/
vxlrfvslangprojprojectpropertiesstartupobject.asp
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.