Namespace System Namespace Windows Namespace Forms Class Application Public /*! @brief アプリケーションの実行ファイルのパスを取得する。 @author Daisuke Yamamoto @date 2007/08/29 @return アプリケーションの実行ファイルのパス文字列 */ Static Function ExecutablePath() As String Dim szModuleFilePath[MAX_PATH] As TCHAR GetModuleFileName( NULL, szModuleFilePath, MAX_PATH ) Return New String( szModuleFilePath ) End Function /*! @brief アプリケーション起動時のディレクトリパスを取得する。 @author Daisuke Yamamoto @date 2007/08/29 @return アプリケーション起動時のディレクトリパス文字列 */ Static Function StartupPath() As String Return System.IO.Path.GetDirectoryName( ExecutablePath ) End Function End Class End Namespace End Namespace End Namespace