vb.net question

  • Thread starter Thread starter Eddie
  • Start date Start date
E

Eddie

Hi,

Is it possible to detect where (which directory) your
vb.net program is running out of within the program?

Thanks in advance.
Eddie
 
Hi,

Dim strPath As String

strPath = Path.GetDirectoryName( _

System.Reflection.Assembly.GetExecutingAssembly.Location)

Ken
 
* "Eddie said:
Is it possible to detect where (which directory) your
vb.net program is running out of within the program?

\\\
Imports System.IO
Imports System.Reflection
..
..
..
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
End Function
///
 
Eddie, try this.

'// Excludes executable name
'***********************************************
Dim strAppPath as String = Application.StartupPath.ToString
'***********************************************

'// Includes executable name
'**************************************************
Dim strAppPath as String = Application.ExecutablePath.ToString
'**************************************************

Anthony
 
Back
Top