VB.Net Equivalent to AppDir

  • Thread starter Thread starter Bryan Dickerson
  • Start date Start date
B

Bryan Dickerson

I looked in the helps and I know that I've seen it before but I can't find
it now. I need to write a 'quickie' pgm that reads a file from the
directory where the .exe is located, so where should I point my
StreamReader? Is there an Assembly.LocationPath or some such?

Thanx!
 
Bryan,

Give:
System.Windows.Forms.Application.ExecutablePath()
a try. It should suit your needs.

Let us know if that covers it,
chrisj

System.Windows.Forms.Application.ExecutablePath()
 
dim dir_base_path As String = System.Windows.Forms.Application.StartupPath
 
Thanks to all (Chris Johnson & poldoj). I found it and it works!
 

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