Setting a property when opening application

I have a app that is opened by another application and also by just opening the exe.

I need to know when it was opened by the other application or when it was opened by a user opening the exe.

Can I set some kind of public variable for flag and what would be the code to do that.
Is there some better solution?


Who is Participating?
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
You could pass in a comand-line variable to indicate that the EXE was called by another application (since simply double clicking the exe would run it without any parameters).

Some links on how to determine the parametes (if any) passed into your app:
All Courses

From novice to tech pro — start learning today.