Top "Sta" questions

Single-Threaded Apartment of the Component Object Model (COM), as opposed to MTA

Single-threaded apartment - cannot instantiate ActiveX control

I need to get information about applied CSS styles in HTML page. I used AxWebBrowser and iterate IHTMLDOMNode. I'm able …

.net exception sta single-threaded
STAThread and multithreading

From the MSDN article on STAThread: Indicates that the COM threading model for an application is single-threaded apartment (STA). (For …

c# .net multithreading sta
How to run something in the STA thread?

In my WPF application I do some async communication (with server). In the callback function I end up creating InkPresenter …

c# .net wpf sta
Starting an STAThread in C#

I am still kind of new to C#, and especially threading in C#. I am trying to start a function …

c# .net wcf sta
How can I make a background worker thread set to Single Thread Apartment?

I am creating an automated test running application. In this part of the application, I am working on a polling …

c# exception-handling backgroundworker clipboard sta
The calling thread must be STA, because many UI components require this error In WPF. On form.show()

Firstly I have read several answers to similar questions on the site but to be honest I find them a …

c# wpf sta
How to run unit tests in STAThread mode?

I would like to test an app that uses the Clipboard (WindowsForms) and I need the Clipboard in my unit …

c# nunit sta
"The calling thread must be STA" workaround

I know there are a few answers on this topic on SO, but I can not get any of the …

wpf multithreading task-parallel-library dispatcher sta
.NET Windows Service needs to use STAThread

I have created a Windows Service that will be calling out to some COM components, so I tagged [STAThread] to …

.net windows-services sta
Process.Start is blocking

I'm calling Process.Start, but it blocks the current thread. pInfo = new ProcessStartInfo("C:\\Windows\\notepad.exe"); // Start process mProcess = …

c# process blocking sta