Hi. Im using a picturebox to display some pictures. I m having a problem with giving the path of the picture. if the pictures are stored in a folder (pics) in .../bin/debug/pics/ . it is possible to give the complete url for the filder (F:\c#\MovieBase\MovieBase\bin\Debug\pics\xy.jpg). but if I m change the drive where the project is being developed (Ex:- F: to C:) i have to change the complete pathe again. is there any solution to give the location of the image without specifying the complete path.
Loading
anushka thialkarathnePosted Jun 12, 2007, 1:24 AM
Jan MontanoPosted Jun 6, 2007, 6:36 AM
Todd VancePosted Jun 5, 2007, 12:43 PM
Youda man!
Am I right in assuming that this way you could concatenate a series of images at the end of that statement ( i.e. - " \\blah\\blah\\" + images[i] +".jpg" ) -- or something like that.
Scott LyslePosted Jun 4, 2007, 8:11 PM
You could do something like this:
this
.BackgroundImage = Image.FromFile(Application.StartupPath + "\\Graphics\\Binary.jpg");However, keep in mind that in debug or release mode the application will execute from the bin/debug or bin/release folder so you could do something like this for the time being:
this
.BackgroundImage = Image.FromFile(Application.StartupPath + "\\...\\...\\Graphics\\Binary.jpg");