Tarren wrote:
Hi:
How would I go about making sure my C# 2.0 app runs under STA, not MTA? Do
I add something in the Main method?
Thanks
You just need to use the STAThread attribute.
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
If you're using a separate thread, the System.Threading.Thread class has
a SetApartmentState method.
Dan Manges