I am new in winform application. this there a way to find application is open from desktop shortcut icon.
Asked
Active
Viewed 51 times
-1
-
Add a command line to the shortcut, if its there at runtime it was launched from a shortcut. – Alex K. Jun 20 '17 at 11:44
1 Answers
3
You could put an argument in the shortcut:
and check for it in your application via its Environment.CommandLine
:
But other than that, no. You won't be able to tell whether someone directly clicked on the executable or even if someone deleted the argument in the shortcut.

rory.ap
- 34,009
- 10
- 83
- 174
-
-
-
@rony:You can find correct answer https://stackoverflow.com/questions/15653921/get-current-folder-path – baj9032 Jul 10 '17 at 10:13