How to link to a file that was included in a project in vb.net

in which directory is the image displayed when you include it in your project?

+2


source to share


1 answer


If it is copied to the output directory, you can use Path.Combine

:



Shared ReadOnly AppDirectory As String = Path.GetDirectoryName(New Uri(GetType(Program).Assembly.CodeBase).LocalPath)

Dim filePath As String = Path.Combine(AppDirectory, "MyFile.jpg")

      

+1


source







All Articles