
(VB4) how to tell if running in development shell or exe
Quote:
> How do you tell if your program is running in the VB Devlopement
> environment
> or as an exe? VB4, 32bit, Win95
> KB has answer for VB3, but I thought there might be a better way for VB4.
> Thanks!
> Shawn
> __
> http://www.cris.com/~shawnlee/ Borg Pursuit Screen Saver for Windoz
Here's a simple solution which assumes that your program running in the
VB environment will be different than the directory location of the
executable.
Assume dev directory is c:\users\berkoski
Near the starting point of my code, I can say...
If Instr$("\users\berkoski", App.Path) then
'-- development environment
Else
'-- standalone executable
End If
I'm not sure if I got the order of the arguments correct on the Instr$
call, but you get the idea.
--
John Berkoski, Consultant
Comsys Technical Services
Rockville, MD