The [STAThread] attribute ensures that the thread calls OleInitialize not CoInitialize. OleInitialize sets up the extra stuff required for OLE Drag and Drop, etc.
Richard http://staff.develop.com/richardb -----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of Richard Birkby Sent: 21 May 2002 11:13 To: [EMAIL PROTECTED] Subject: [DOTNET] STAThread and Clipboard/DnD/CommonDialog Why does a thread have to be marked as an STAThread when it's calling operations on the clipboard? Why can't COM marshal the calls from the (default) MTA to the STA required by the clipboard? Richard You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
