Hammy
Freshman
Hi all,
I am new to VB and am working through some vb.net exercises. I some of them I place a picturebox control on my form, then with various events set theimage using system.drawing.image.fromfile method. When using this method, they have me place a hard-coded path to the images.
My head got to thinking, when I build a deployment solution for these projects down the road, if these images have a hard coded path, is it not going to cause errors unless the user were to install the application in the EXACT same location as my working solution? I may be jumping the gun and this will end up being covered, but I am the type that likes to find solutions when I see a potential problem.
I was playing around with setting the path to something like (Application.StartupPath & "\images\image.bmp") for example. Thinking that when I create the deployment I would be sure to include tohe images and create an image directory in the deployment setup.
What is the best way to code the path for these types of images so they will still be displayed after deployment regardless of the user's installation choices? Is this method I am playing around with a good one?
TIA
Hammy
I am new to VB and am working through some vb.net exercises. I some of them I place a picturebox control on my form, then with various events set theimage using system.drawing.image.fromfile method. When using this method, they have me place a hard-coded path to the images.
My head got to thinking, when I build a deployment solution for these projects down the road, if these images have a hard coded path, is it not going to cause errors unless the user were to install the application in the EXACT same location as my working solution? I may be jumping the gun and this will end up being covered, but I am the type that likes to find solutions when I see a potential problem.
I was playing around with setting the path to something like (Application.StartupPath & "\images\image.bmp") for example. Thinking that when I create the deployment I would be sure to include tohe images and create an image directory in the deployment setup.
What is the best way to code the path for these types of images so they will still be displayed after deployment regardless of the user's installation choices? Is this method I am playing around with a good one?
TIA
Hammy