Link to home
Start Free TrialLog in
Avatar of knobloch
knobloch

asked on

How to load 55 Images into 10 pictureBoxs ?

Hi
Could someone tell me how to do some kind of photo album in windows forms?
I have 55 images stored in resource file, and on my Form I have 10 pictureBoxes. I need to load these images into 10 picturesBoxes, but it must be done one by one I mean when I click for example on some button I want to see first 10 images next time when I click button next 10 images should be loaded into picturesBoxes and so on.

I know how to get images from resource file, but I have no idea how to handle swapping images. Moreover, I think there will be a problem with the five last images since it is 10 pictureBoxes on my form.

Does anyone have an idea how to do it?
I will appreciate any pointers.

Thanks





Avatar of armoghan
armoghan
Flag of Pakistan image

Are you making a thumb nail kind of thing?
if yes try this approach
http://www.codeproject.com/csharp/thumbgenerator.asp


About the question of 10 loading at a time..
When you have last last 5.
Place them in first 5 and leave the last 5 blank. Or put a gerneal purpose image on them
Avatar of knobloch
knobloch

ASKER

It just making thumbs.
 I need to load images into pictureBoxes and show them on Form.
I can show at most 10 at the same time.
Thanks anyway
only a small idea:

1. search all pictures in your directory and store their names in a list or array
2. remember the index of the first picture currently to show (in this initial case 0)
3. fill the picturebox with the first ten pictures found in your array
-> so you have ten pictures shown

4. to let the user navigate through your pictures provide a previous- and a next-button
-> if someone pushes next place your index + X (10?) if there are still enough images left to be shown
-> if someone pushes prev place your index - X as long as it is >0

i do not know, if this idea would solve your problem? which coding-language do you like to use?
ASKER CERTIFIED SOLUTION
Avatar of kolpdc
kolpdc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
lacking time at the moment. tell me if you need more.

I was just looking for something like this.
 Thank, a lot
no problem - you're welcome.

if it does not reach, tell me.