You know when you insert an image into BASIC it makes a new folder called "Resources" and puts the picture in it? Well, I want a file in it so I can access it.

PictureBox3.ImageLocation = "C:\Users\Kenneth Rhee\Desktop\CIB\Profiles\" + TextBox3.Text + "" + TextBox4.Text + "" + TextBox6.Text + "\" + TextBox3.Text + "" + TextBox4.Text + "" + TextBox6.Text + ".jpg"

So basically I want to know the file path of the "resources" folder so even if another person downloads it, they can access the files. I think the file path is something like WindowsApplication1.My.Resources.Resources.icon_cadsoft_eagle because that's what the ImageLocation said in a PictureBox. Any ideas? Any replies would be appreicated. Thanks in advance.

7 Years
Discussion Span
Last Post by Teme64

I want to know the file path of the "resources" folder

Relative path to your resource folder is

Dim resourcePath As String
resourcePath = My.Resources.ResourceManager.BaseName

and to get fully qualified path

Dim fullPath As String
fullPath = Path.GetFullPath(My.Resources.ResourceManager.BaseName)

You can also create your own resource manager and decide where to store items

Dim myResourceManager As Resources.ResourceManager
myResourceManager = Resources.ResourceManager.CreateFileBasedResourceManager("myResources", "C:\Temp\AppName", System.Type.GetType("Image"))


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.