Dim strAppDir As String = Path.GetDirectoryName( _
Assembly.GetExecutingAssembly().GetName().CodeBase)
Dim strFullPathToMyFile As String = Path.Combine(strAppDir, "myFileName.txt")
MessageBox.Show(String.Format("Path to the application is: '{0}'." + _
"Full path to the file in the application folder is: '{1}'", _
strAppDir, strFullPathToMyFile))
ref:http://msdn2.microsoft.com/zh-tw/library/ms229654.aspx
沒有留言:
張貼留言