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.
 
Back
Top