views:

698

answers:

2

How do I allow only one instance of a WPF application to run?

Thanks.

+2  A: 

Try this: Single instance application. Ive used the second method and it works fine.

Artur Carvalho
the second method is the best i've found. just get over the fact it uses Microsoft.VisualBasic DLL and it does everything else you need - including proper use of .NET remoting (no sockets or mutexes to create yourself). but best of all it makes it easy to pass parameters to the already running application, or simply bring it to the front when you try to reopen it
Simon_Weaver