Relative Content

Tag Archive for c#winformscom

What are the risks of using a Form without starting the message pump for a thread?

I have a third party WinForms control that I need to use for visualizing and saving data as images. I don’t really need to see the form on my screen, I just need it to exist. Currently I just create a new Thread, set it to STA and then create a Form on the thread (and move the form off the screen because I don’t want to see it). The thread then gets blocked in a loop where it sometimes picks up items for rendering from a BlockingCollection