実行中のプログラムのパスを取得する
投稿日: 2006-11-05 17:47:21
VB6では実行中のプログラムのパスは app.path で得ることができました。
VB2005では Application.ExecutablePath で取得できます。
■例:実行中のプログラムのフルパスを取得する
Dim FullPath As String
FullPath = Application.ExecutablePath
MsgBox(FullPath)
■例:実行中のプログラムのフォルダ名を取得する
Dim FolderName As String
FolderName = Application.StartupPath
MsgBox(FolderName)
■例:実行中のDLLのフルパスを取得する
Dim FullPath As String
FullPath = Me.GetType.Assembly.Location
MsgBox(FullPath)