Hello,
I have a pretty simple problem.
When program has been started and user tries to start another instance. That new instance needs to bring old instance to front and quit.
The solution seams pretty simple, I could take the code from http://www.codeproject.com/KB/cs/oneprocessonly.aspx and be done with it.
Fortunately/Unfortunately I'm using WPF. This means, there is no way for me to control content of Main() method.
I have found solution to this problem "How can I provide my own Main() method in my WPF application?" @ http://learnwpf.com/Posts/Post.aspx?postId=a5643949-ab80-47f9-93c8-f5e8e5782d34.
But this solution brings another problems like Expression Blend stats to panic when there is no App.xaml file.
I could use App classes OnStarted event, but I'm using WPF's splash screen resource, this would mean that extra splash screen will be displayed.
My last concern with this method is it seams not "future-proof" to me :(.
Is there any WPF-style solution to this problem?
Thank You in advance.