Happy Friday SO!
I’m building a multi-WinForm application and am having some troubles.
I have a main WinForm that stays open at all times. It hits a database every minute looking for changes, and if there is a change, it will open the second WinForm (this may seem like a stupid way to do things, but for my purpose, this is the best method).
Just sticking the following code into my Form1.cs doesn’t do the trick:
Application.Run(new Form2());
Can you guys point me in the right direction? I have no idea where to turn.
and to prevent a ton of forms being opened, maybe:
@Comment:
A
BackgroundWorkeris used to keep your current UI Thread responsive. It was not designed to keep multiple forms pumping happily along. Look into running your intensive code as a Background thread within aThreadPool.