お世話になっております。
実は、vb2008で自分の今動いているプログラムのフルパス名
を参照したいのですが、どうしたらいいのでしょうか?
app.pathを使ったのですが、起こられてしまいました。
お忙しいところ誠に申し訳ありませんが、お願いします。
[Assembly].GetEntryAssembly().Location
かなぁ。
[Assembly].GetExecutingAssembly().Location
かもしれませんが。
MSDN: Assembly.GetEntryAssembly メソッド (System.Reflection)
http://msdn.microsoft.com/ja-jp/library/system.reflection.assembly.getentryassembly.aspx
MSDN: Assembly.GetExecutingAssembly メソッド (System.Reflection)
http://msdn.microsoft.com/ja-jp/library/system.reflection.assembly.getexecutingassembly.aspx
MSDN: Assembly.Location プロパティ (System.Reflection)
http://msdn.microsoft.com/ja-jp/library/system.reflection.assembly.location.aspx
>app.pathを使ったのですが、起こられてしまいました。
App.Path に代わるものには、下記のようなものがあります。
1. System.Reflection.Assembly.GetExecutingAssembly.Location
2. Application.StartupPath
3. Application.ExecutablePath
4. System.AppDomain.CurrentDomain.BaseDirectory
http://hanatyan.sakura.ne.jp/dotnet/vb6tonet.htm
Application.ExecutablePath の使用例
http://hanatyan.sakura.ne.jp/dotnet/file14.htm#no1
お返事遅れてどうもすみません。
YuOさん、花ちゃんさんの通りにやってみたら、
その通りになりました。
YuOさん、花ちゃんさん、貴重なアドバイス本当にありがとうございました。
ツイート | ![]() |