We have a WinForms application in C# 3.5 (SP 1). We would like to restrict the application to one process in memory with multiple window instances. We are not looking for an MDI approach, but to have separate main form instances without launching multiple application processes.
We are evaluating three approaches:
- Windows Messages
- COM
- WCF
We have the rough details for the first 2 (PInvoke with Windows Messages and overriding WinProc, COM Registry, etc) and they use older technologies.
We discussed the idea of using WCF with named pipes instead and think this may be cleanest and easiest way to accomplish the task at hand.
What is the cleanest, modern way of restricting the application to one process with multiple main form instances?