|
-
November 20th, 1998, 12:35 PM
#1
Path during execution.
I have what might be a simple question. I am new with VB, and I have
noticed that while running my App through the VB environment, the path is
set to the VB directory. However, the release App will have a different
initial path. (This comes into play with my DLL's. For the final app,
the EXE and the DLL will be in the same folder, so I would like to use
"MyDLL" as the lib, but while debugging I must use "C:\FullPath\MyDll.dll".)
So, Is there a way to tell the environment where to start the initial path?
-
November 23rd, 1998, 03:22 AM
#2
Re: Path during execution.
You can use the path statement from good old dos to set it, but that's not needed.
When running apps in the IDE, the App.Path = the VB directory (although when you say Debug.Print App.path it might tell you the correct path).
When you've created an exe, the App.Path is the path where the exe is (e.g. C:\Program Files\MyProgram ), so there's no need to include a path in the lib-part of the declaration.
You can consider setting the dll in the system directory when you're debugging. If its not an ActiveX dll (and it sounds like it isn't), it doesn't matter where you put the dll as long as Windows can find it. So, if you set the dll in the system dir while debugging, you can declare the lib part as 'dllname.dll'. When the exe is finished, you don;t have to change your code -> just add the dll
in the same path as the exe.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|