Newbie's File Question 
Author Message
 Newbie's File Question

Could some kind soul please tell me
the code I should use to find the program's
own path?  I'm using VB4.  Thanks a lot.
PapaPaul


Fri, 16 Nov 2001 03:00:00 GMT  
 Newbie's File Question
App.Path

Be careful, in VB 4, App.Path returns the root VB folder during development.
It does return as expected at run-time, however.

You could try a wrapper function for App.Path:

Public Function MyAppPath As String
    If App.Path = "C:\MyVBFolder" Then
        MyAppPath = "C:\MyDevelopmentFolder"
    Else
        MyAppPath = App.Path
    End If
End Function


Quote:
> Could some kind soul please tell me
> the code I should use to find the program's
> own path?  I'm using VB4.  Thanks a lot.
> PapaPaul



Fri, 16 Nov 2001 03:00:00 GMT  
 Newbie's File Question
Thanks a lot, Andrew, for your help.
The wrapper works wonders!
Regards, PapaPaul
Quote:

>App.Path
>You could try a wrapper function for App.Path:

>Public Function MyAppPath As String
>    If App.Path = "C:\MyVBFolder" Then
>        MyAppPath = "C:\MyDevelopmentFolder"
>    Else
>        MyAppPath = App.Path
>    End If
>End Function



Fri, 16 Nov 2001 03:00:00 GMT  
 Newbie's File Question
app.path

Quote:

> Could some kind soul please tell me
> the code I should use to find the program's
> own path?  I'm using VB4.  Thanks a lot.
> PapaPaul

--




Sun, 18 Nov 2001 03:00:00 GMT  
 Newbie's File Question
Try

App.path

Quote:

>app.path


>> Could some kind soul please tell me
>> the code I should use to find the program's
>> own path?  I'm using VB4.  Thanks a lot.
>> PapaPaul

>--





Mon, 19 Nov 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie question: Database of .wav's and .gif's

2. Quick newbie question - 'Cint'

3. Drag'n'Drop Newbie question

4. Newbie Question: about file type for .frm files

5. newbie's question

6. Newbie question - can't access registry key from limited account

7. Newbie question: OleDbDataAdapter.Update doesn't

8. newbie's question

9. Newbie question on retrieving records from Access '97 database

10. NEWBIE's question!

11. Newbie's question - rotation of an image

12. Newbie Question on MP3's

 

 
Powered by phpBB® Forum Software