I have a GUI with a Named Pipe Server running in a Backgroundworker, which gets commands from the Named Pipe in the DoWork() event handler and interacts with the GUI's controls in the RunWorkerCompleted() event handler.
The GUI sometimes opens Modal windows, that prevent the RunWorkerCompleted() event handler from running until the window is closed.
Is there any way for me to close these Modal windows with the Named Pipe Server and Backgroundworker?
The best thing I've found so far is the hack in this post (How to continue executing code after calling ShowDialog()), where I would use Show() and Parent.Enabled = False instead of ShowDialong(). I'm hoping there is something cleaner, however.