Ethan Liew Technology Blog
Technology, Art, Solution, Tips, Multimedia, How To, What Is, Programming, Software, Freelance
Mar 14, 2009
Error the calling thred must be STA, because many UI components require this
Tips:
Thread thread = new Thread(new ThreadStart(CreateUIInAnotherThread));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
private void CreateUIInAnotherThread()
{
Window wd = new Window();
wd.Show();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment