Title: | Microsoft Visual Basic |
Moderator: | TAMARA::DFEDOR::fedor |
Created: | Thu May 02 1991 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2565 |
Total number of notes: | 10453 |
Simple question (I hope ..) Is it possible to differentiate, in the code, between runtime and dev. envirinm. ?? The 'CurDir' functionality/result differs when you're in either of the 2........ (runtime : .EXE dir) (dev. : VB dir) Frits
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2520.1 | MIASYS::HETRICK | Thu Mar 20 1997 12:37 | 7 | ||
'CurDir' is the current directory. 'App.Path' is the directory in which the application resides. The two do not need to be the same -- in setting up a shortcut, you can specify the current directory for the application to be something other than the directory where the application resides. Brian | |||||
2520.2 | how to | XSTACY::PATTISON | A rolling stone gets the worm | Mon Mar 24 1997 11:55 | 8 |
One way to do this is to use an SDK call to GetModuleFileName to determine the exe name (see also App.hInstance) If the answer is VB32.EXE then you know you are in the development environment. Anything else, you're not. Dave | |||||
2520.3 | Try App.EXEname | MRSERV::PETERS | Wed Apr 23 1997 16:35 | 6 | |
I'd suggest looking at App.EXEname. But this won't do you any good if your EXE name is the same as your project name. Otherwise, this is a simple technique for what you want to do. Don |