Quote:
>What code will determine at run time if execution is from within the IDE?
The API GetModuleHandle() will return the Windows handle to a currently
running module. If the module is not running, it returns zero. The
following line:
bolIDE = GetModuleHandle("vb6.exe")
sets a flag, bolIDE, that can be used within the program to determine if VB
is running. The drawback is that if the user is running your program, and
is ALSO running VB for whatever reason, this method will not work (it just
tells if VB is running; it doesn't make tell if your app is being run from
it).