Im writing an ActiveX .DLL and I would like to be able to tell if the user is running the control in Run mode or if it's being called by a compiled .EXE.

For instance, when I'm writing software and testing it by running the project with F5, I want it to do "this". When it's being referenced from a compiled .EXE, I want it to do "that".

I've seen this done before, but I can't find the code to it... any help would be appreciated.