App.Path

  • Thread starter Thread starter Mike Labosh
  • Start date Start date
M

Mike Labosh

I need the VB.NET equivalent to this, i.e. the path to the folder where my
program lives.
 
Mike Labosh said:
I need the VB.NET equivalent to this, i.e. the path to the
folder where my program lives.

'Application.StartupPath', or more general (can be used in DLL projects
too):

\\\
Imports System.IO
Imports System.Reflection
..
..
..
Private Function ApplicationPath() As String

' Use 'GetEntryAssembly' to get the path to the EXE.
Return _
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
End Function
///
 

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

Back
Top