Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

STAThread

0 views
Skip to first unread message

Magnus Lindberg

unread,
Oct 16, 2001, 3:51:43 AM10/16/01
to
What does the STAThread-attribute do?

--
Magnus Lindberg
cshrp.net - Elegant code by witty programmers

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Patrick Steele

unread,
Oct 16, 2001, 8:31:58 AM10/16/01
to
In article <uSKFndhVBHA.1576@tkmsftngp03> (from Magnus Lindberg
<magnus....@csharpsweden.com>),

> What does the STAThread-attribute do?

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpref/html/frlrfSystemSTAThreadAttributeClassTopic.asp

It sets the threading model to Single Thread Apartment (like VB6
objects).

--
Patrick Steele
Microsoft .NET MVP

Saurabh Nandu

unread,
Oct 16, 2001, 1:15:28 PM10/16/01
to
In layman's terms that means that at a given point of time only one thread
will be manipulating your main form (in a WinForm application)...
So you have to be careful while trying to use Threading and Windows Forms
... else use MTAThread...

Regards,
Saurabh Nandu
www.mastercsharp.com
Master C#, the easy way...


Henry Jia

unread,
Oct 17, 2001, 1:33:26 AM10/17/01
to
Any one of you know how to use CodeDom set this attribute?

Henry

"Saurabh Nandu" <sau...@UltraApps.com> wrote in message
news:uxaiiZmVBHA.1500@tkmsftngp05...

0 new messages