[RESOLVED] Load an Image in a PictureBox from a ListBox
Hi!
I want to make a program similar to this one: http://modthesims.info/download.php?t=275562
I already have the ListBox ready. But how do I load the images?
The image name works like this:
-File1.package
-File1A.jpg
-File1B.jpg
So the .package is removed and A.jpg or B.jpg is added.
This doesn't make much sense unless you see the program at the above link
ANY HELP is greatly appreciated!
Re: Load an Image in a PictureBox from a ListBox
You can use the mid() function or the substring function to modify the filename
Code:
JpgName=Mid(Filename,1,len(FileName)-7) & "jpg"
As for loading the image once you have the filename [assuming you are using a picturebox] you can simply set the image property = image.fromfile(jpgname)
Re: Load an Image in a PictureBox from a ListBox
Thank you SO MUCH. I really appreciate it! :)
Re: Load an Image in a PictureBox from a ListBox
If you feel your thread has been answered to your satisfaction NickM406, then please mark your thread Resolved, as explained here :
http://www.codeguru.com/forum/showthread.php?t=403073