Where's my App.Path in VB.NET?


ID: 1064
Author: Abstractvb.com
Date: 9/15/2002 12:59:10 PM
VB.NET

Description

The APP Object no longer exists in VB.NET, so calling App.Path to get the location of your application does not work. Thankfully there are many other ways to do this in VB.NET, here are a few.

NOTE: Some of these will only work for forms and not DLL's without any UI. The first two that reference the System.Windows.Forms namespace will not work in a DLL with no UI.

Code

Here are a few examples: (I'm sure there are more.)

System.Windows.Forms.Application.ExecutablePath
System.Windows.Forms.Application.StartupPath
System.AppDomain.CurrentDomain.BaseDirectory()
System.GetEntryAssembly().Location

2006/07/20 16:51 2006/07/20 16:51
Posted by 인생을 설계하는 프로그래머

트랙백 보낼 주소 : http://love-02.com/trackback/32


BLOG main image
by 인생을 설계하는 프로그래머

카테고리

Life Designer (139)
컴퓨터공학박사 (80)
세상 (24)
건강한 삶 (8)
I Love Korea (2)
海兵隊 (3)
Common Sense! (4)
Game is Life! (12)
Life of Digital (4)
추억으로의 여행 (0)
애마 카돌이! (1)
세상속으로! (1)

글 보관함

달력

«   2010/09   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30