Important alert: (current site time 7/15/2013 8:52:17 AM EDT)
 

VB icon

An easy way to get App.path in VB .NET

Email
Submitted on: 5/10/2002 8:13:02 AM
By: Samer Shrourou 
Level: Beginner
User Rating: By 7 Users
Compatibility: VB.NET
Views: 37768
 
     Get the path of your running application in one line.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
//**************************************
// Name: An easy way to get App.path in VB .NET
// Description:Get the path of your running application in one line.
// By: Samer Shrourou
//
// Returns:The full path of your running application.
//
//This code is copyrighted and has// limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=269&lngWId=10//for details.//**************************************

strAppPath = Application.StartupPath


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

11/16/2002 7:21:42 AMdarkone

this is great but i already copyrited it and my lwayer will be in contact ..jk
(If this comment was disrespectful, please report it.)

 
3/20/2003 11:22:09 AMDennis Fisch

thanks for this piece of code, i find it very hard to find snippets like this in the MSDN when i dont know exactly how to look for it.
(If this comment was disrespectful, please report it.)

 
3/31/2003 10:26:55 AM

The Simple things are the best ones...
(If this comment was disrespectful, please report it.)

 
6/26/2003 9:23:07 AMYaniv Arazi

works fine dude.
yummy!!
(If this comment was disrespectful, please report it.)

 
7/20/2003 12:14:25 PMdaniel

how can it work fine for newbies because you forgot about the Imports System.Windows.Forms because without that vb will produce an error saying that application is not declared
(If this comment was disrespectful, please report it.)

 
2/24/2004 10:50:44 AMThe Bob

Had no problems with this. Sweet. :)

btw Daniel didn't have to add anything to the imports. Maybe its cuz I'm runnin the 1.1 framework... I dunno.
(If this comment was disrespectful, please report it.)

 
5/2/2004 7:35:25 PMPsY Grice

Spot on dude!
(If this comment was disrespectful, please report it.)

 
9/7/2004 6:34:49 AMesse.erre

in compact framework????
(If this comment was disrespectful, please report it.)

 
12/1/2004 9:11:26 AM

hai
(If this comment was disrespectful, please report it.)

 
5/30/2008 3:41:34 AMEmmanuel Sakala

Your code, does not work for me , how do I use it
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.