Reputation: 2592
I am new in winform application. this there a way to find application is open from desktop shortcut icon.
Upvotes: -1
Views: 53
Reputation: 35318
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.
Upvotes: 3