Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

vb.net function for Path to executing program (equivalent to VB6 App.Path)?

Posted on 2013-05-23
2
684 Views
Last Modified: 2013-05-24
Hi Experts,

I am looking for the vb.net equivalent to the VB6 function, App.Path.

I have tried Application.ExecutablePath, but that gives me something like:
D:\Dev-Ver6.0\VB.NET\working copy root\CIRCLY60\VB.NET\bin\Debug\CIRCLY.EXE

What I am after is:
D:\Dev-Ver6.0\VB.NET\working copy root\CIRCLY60\VB.NET\bin\Debug

I know I could trim off the "\CIRCLY.EXE" part from the end of the string, but I assume there is something more elegant?

Regards,
Leigh
0
Comment
Question by:LeighWardle
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39193139
If this is a Forms app, then you can use Application.StartupPath.
0
 
LVL 1

Author Closing Comment

by:LeighWardle
ID: 39193550
Thanks, kaufmed.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question