app.path error? 
Author Message
 app.path error?

In my computer, when I write the code say app.path +"\pict\pict1.bmp"
It run fine on VB envornment. Then I compile it into EXE and install it and
put the EXE in root.
Error occur.
It seems that in Root the app.path becomes says "D:\"
In subdirectory, it becomes says "D:\pict"
*** Without \
is it Bug or the EXE should NOT put into Root or this case only in my
computer.
* I use VB6 enterprise sp5 under WinMe.


Sun, 26 Oct 2003 11:14:29 GMT  
 app.path error?
The App.Path only has a trailing backslash when the
application path is a drive, such as "C:\" or "D:\".
If in a subdirectory, the trailing backslash is not there.

Just make sure that App.Path ends with a backslash.
If Mid$(App.Path,Len(App.Path),1) = "\" Then
    path = App.Path '    already there
Else
    path = App.Path & "\"
End If

There is an API for that in shlwapi.dll called
PathAddBackslash (I'm not recommending it,
just mention it to make you aware).

Alex


Quote:
> In my computer, when I write the code say app.path +"\pict\pict1.bmp"
> It run fine on VB envornment. Then I compile it into EXE and install it
and
> put the EXE in root.
> Error occur.
> It seems that in Root the app.path becomes says "D:\"
> In subdirectory, it becomes says "D:\pict"
> *** Without \
> is it Bug or the EXE should NOT put into Root or this case only in my
> computer.
> * I use VB6 enterprise sp5 under WinMe.



Sun, 26 Oct 2003 22:35:27 GMT  
 app.path error?
thanks


Mon, 27 Oct 2003 08:26:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Paths and App.Path

2. using application path (app.path)

3. App.Path only returning short path name - Why?

4. app.path only returns short path name

5. Help: App.Path returns 8.3 path in VB4/Win95

6. PATH-APP AND MDB-PATH

7. app-path and mdb-path

8. App.Path returns "short" path name

9. Changing Long Paths to Short Paths in a 16-bit App

10. Long Path Names give Runtime error 76 - Path not found

11. Access97, Win95 Error 76 Path error 99

12. Error 75: File/Path Access Error

 

 
Powered by phpBB® Forum Software