I'm sorry about my title may be it make you confusing (it's just I don't know what words should I use). My problem is I don't want to allow user to open my application multiple time. Please help. Thank you in advance.
- 1Why not? This is a very annoying thing to do to a user.SLaks– SLaks2013-04-24 15:46:02 +00:00Commented Apr 24, 2013 at 15:46
- 2@SLaks: It's not entirely unreasonable; ever try to open a second instance of Skype? Personally there are some cases where it would be more annoying to get a new instance rather than be dropped into an existing one.Geoff– Geoff2013-04-24 16:11:12 +00:00Commented Apr 24, 2013 at 16:11
Add a comment |
2 Answers
Use the “Make single instance application” flag; in the solution explorer, right-click the project and select properties. See this question for more details.
MSDN documentation here.
Screenshot:

1 Comment
Osama Gadour
can u imagine that I'm using a code to check if the process is running to allow only one instance of my application :( just found this solution now, thanks, I feel stupid :)
Use the “Make single instance application” flag; in the solution explorer
1 Comment
GNMercado
duplicate answer same as geoff