Also, when I try to bring up a dialog box from a class with no form, I get an exception of "control cannot be instantiated because the current thread is not in a single-threaded apartment". When I put <STAThread()> in front of the function that throws the exception, GetApartmentState still says MTA.
I just discovered that from the main form GetApartmentState says STA, so somehow the formless class has been switched into an MTA state while the rest of the project is in an STA state.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.