//
archives

COM Apartment Issues

This category contains 1 post

Why an ActiveX Control on a Managed Window Form Must Be STA-based.

1. Introduction. 1.1 A Managed Windows Form application may freely incorporate an ActiveX control on its window. 1.2 However, an important requirement is that the thread which creates the window (that contains the ActiveX control) must be an STA thread. 1.3 Otherwise, a System.Threading.ThreadStateException will be thrown with the following being a typical accompanying error message : An unhandled … Continue reading