If you're looking to create a new thread that is capable of creating and dealing with Window handles, then you can use the SetApartmentState
function on the Thread object and set it to STA
. You'll also likely need to call Application.Run
inside the method for this thread in order to create your message loop. However, bear in mind that you're subject to the same cross-threading no-no's that you have in any other thread (ie, you can only interact with the handle for a control on the thread inside which it was created), so you can't do anything on your other UI thread without switching contexts.