Filenames 
Author Message
 Filenames

My problem is that i have wrote a prog in vb5 and have had to type in the
paths to data files in the code eg "C:\program files\myprog\mydata.dat" this
works fine for me but when i used the setup aplication to distribute this to
my friends the prog no longer works because he has installed it in a
different directory.  How do i get around this problem

EMAIL



Thu, 16 Aug 2001 03:00:00 GMT  
 Filenames
Whatever directory your friend (or any user) installs your program in is
contained in the App.Path property. Instead of "hard coding" the directory
path to the file named mydata.dat, use App.Path+"\mydata.dat" in your
program. That will make it work properly no matter where it has been
installed.

Rick

Quote:

>My problem is that i have wrote a prog in vb5 and have had to type in the
>paths to data files in the code eg "C:\program files\myprog\mydata.dat"
this
>works fine for me but when i used the setup aplication to distribute this
to
>my friends the prog no longer works because he has installed it in a
>different directory.  How do i get around this problem

>EMAIL




Thu, 16 Aug 2001 03:00:00 GMT  
 Filenames
Quote:

> My problem is that i have wrote a prog in vb5 and have had to type in the
> paths to data files in the code eg "C:\program files\myprog\mydata.dat" this
> works fine for me but when i used the setup aplication to distribute this to
> my friends the prog no longer works because he has installed it in a
> different directory.  How do i get around this problem

> EMAIL


Hi,

use the App.path to determine where it has been installed and then set
up your db there or in a sub directory.

Regards

Trevor



Fri, 17 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. getting just the filename, not the filename path from the opendialog control

2. SHORT filename to LONG filename???

3. ? How extract filename, dir, filename, extension ?

4. Short Filename to Long Filename ???

5. Long Filename -> Short Filename

6. Common Dialog Control - Setting .filename property w/multiple filenames

7. SHORT filename to LONG filename???

8. Convert long filenames to short filenames

9. cutting out filename from filename returned by common dialog control

10. Convert Long Filenames to Short Filenames in VB4 16-Bit

11. HowTo Get Long Filenames from 8.3 Filenames?

12. Converting long filenames to short filenames in VB4.0 16-bit

 

 
Powered by phpBB® Forum Software