Top "Sta" questions

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

Why are WinForms applications STAThread by default?

When you create an empty WinForms application with Visual Studio, the template has the STAThread attribute in the main application …

c# .net winforms sta
Use [STAThread] in a console program in C#

I have written code for a C# console application. It copies a clipboard value to a file, and it runs …

c# console sta
How to post messages to an STA thread running a message pump?

So, following this, I decided to explicitly instantiate a COM object on a dedicated STA thread. Experiments showed that the …

c# com interop message-queue sta
ActiveX control cannot be instantiated because thread is in a single-threaded apartment. Happens after waking PC from sleep

I am working on a VOIP client (Window's form) that opens a browser window (ExtendedWebBrowser) when a call is made …

activex sta single-threaded apartments apartment-state
STA, MTA and OLE nightmare

I have to include a .NET application into another .NET application as a plugin. The plugin interface requires me to …

.net multithreading sta mta
SetApartmentState and [STAThread]

In Watin's source code, there is this piece of code: public void NavigateToNoWait(Uri url) { var thread = new Thread(GoToNoWaitInternal); …

c# multithreading com watin sta
Convert Keith Hill's PowerShell Get-Clipboard and Set-Clipboard to a PSM1 script

I'd like to convert Keith Hill's C# implementation of Get-Clipboard and Set-Clipboard into pure PowerShell as a .PSM1 file. Is …

c# powershell multithreading sta
Variance matrix from polar to cartesian coordinates

I am dealing with a time series in polar coordinates and I am applying the Kalman filter for predictions. The …

r math sta