How do I load a picture from resource file into a picturebox?
-Visual Basic Express 2005-
I have a resource file and have included all my images into. I need to load hundred.jpg into a picurebox when a certain event occurs. I hope to get the simplest line of code possible to do this
Can anyone please help? Thanks in advance :)
PictureBox1.ImageLocation =
"C:\Documents and Settings\Owner\My Documents\Visual Studio 2005\Projects\Project Name\Project Name\Resources\hundred.jpg"The italicized Project Name should be replaced with the name of your project file, as should PictureBox1 be replaced with the name of the picture box.
I pulled all of this from memory, so if the above doesn't work, let me know and I'll find out what the correct code is.
Hello,
Can someone please tell me how to create a "Resource File" in VB.net 2003 and VB.net 2005? I have been trying to figure this thing out for a week now. There is no good documentation on it. I understand the code for including pictures from the resource file in the application as code, I just need to figure out how to add the resource file to the application.
Thank you.
If you need to use it to store pictures you should just add a folder called images and put your images in it. Then you can drag and drop the image to anywhere on your page. When you publish your site, you'll have a folder called images with them in it. Does this answer your question?