|
-
June 28th, 2010, 12:13 PM
#1
[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!
-
June 28th, 2010, 04:41 PM
#2
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)
Always use [code][/code] tags when posting code.
-
June 30th, 2010, 01:44 PM
#3
Re: Load an Image in a PictureBox from a ListBox
Thank you SO MUCH. I really appreciate it!
-
July 1st, 2010, 01:06 AM
#4
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|