App.Path?

  • Thread starter Thread starter Doo-Dah Man
  • Start date Start date
Hi,

System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)

Ken
 
Hi Doo-Dah Man

You can try with the Application object
Like this
Application.StartupPath(

Hope this helps you

Sadha Sivam S
 
This works for me...

Public Function AppPath()
Dim stmp() As String
Dim sPath As String
Dim i As Integer
stmp = Split(Application.ExecutablePath(), "\")
stmp(UBound(stmp)) = ""
sPath = Join(stmp, "\")
If Microsoft.VisualBasic.Right(sPath, 1) <> "\" Then
sPath = sPath & "\"
End If
Return sPath
End Function
 
* Doo-Dah Man said:
What has replaced this method?

\\\
Imports System.IO
Imports System.Reflection
..
..
..
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
End Function
///
 
* "Perry Ogletree said:
stmp = Split(Application.ExecutablePath(), "\")
stmp(UBound(stmp)) = ""
sPath = Join(stmp, "\")
If Microsoft.VisualBasic.Right(sPath, 1) <> "\" Then
sPath = sPath & "\"
End If
Return sPath

Maybe using 'System.IO.Path.Combine' is more comfortable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Where is app.path? 6
App.Path replacement 16
App.Path 5
App.Path 2
App.Path in vb.net 2
dumb question - How can I get the app.path from .NET? 14
App.Path 3
Special Folders for the program.exe 3

Back
Top