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.
Asked
Active
Viewed 1.6k times
8
-
1Why not? This is a very annoying thing to do to a user. – SLaks Apr 24 '13 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 Apr 24 '13 at 16:11
2 Answers
19
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:
-
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 :) – Osama Gadour May 21 '22 at 20:04