How I can make my application showing a msgbox of the path where my application is saved? I mean, how I can get it to tell me "ex. C:\Temp"?
Printable View
How I can make my application showing a msgbox of the path where my application is saved? I mean, how I can get it to tell me "ex. C:\Temp"?
VB.NET Code:
Application.StartupPath
It was so simple, damn it I am so damn stupid. Thanks Atheist.
It only seems obvious/simple once you know ;)
Dont forget to mark this thread as resolved :)
One more Question, How I can use it If I want to do this
Instead of using C:\Temp\file.exe using Application.StartUpPath & File.exe
How I can do that?
You can use IO.Path.Combine, like this
vb.net Code:
IO.Path.Combine(Application.StartUpPath, "File.exe")
In what context? Use Path.Combine to join two paths:
Edit: Aargh! ;)Code:Dim path As String = System.IO.Path.Combine(Application.StartUpPath, "File.exe")