Solved

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

Posted on 2013-05-23
2
655 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 74

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now