Loading multiple image files
-
Hi all! I'm trying to load several image files into a form. These files may overlap and can be moved by up, down, left and right button controls. How can I achieve this? Do I have to use picture boxes? Can one picture box contain several images? Thanks!;)
-
Hi all! I'm trying to load several image files into a form. These files may overlap and can be moved by up, down, left and right button controls. How can I achieve this? Do I have to use picture boxes? Can one picture box contain several images? Thanks!;)
You can load your pictures into an array of type Image or BitMap and then assign the element of the array that contains the picture you want to display to the image property of the PictureBox. Loading the pictures into an array allows you to quickly change the picutures (without have to load each one from a file, all done when you load them into the array) I think you could also use an ImageList (control), but I'm guessing and have not had much luck with it's implimentation. Last time I used it I have a problem with my pictures being reformatted and never looked into it. www.lovethosetrains.com
-
You can load your pictures into an array of type Image or BitMap and then assign the element of the array that contains the picture you want to display to the image property of the PictureBox. Loading the pictures into an array allows you to quickly change the picutures (without have to load each one from a file, all done when you load them into the array) I think you could also use an ImageList (control), but I'm guessing and have not had much luck with it's implimentation. Last time I used it I have a problem with my pictures being reformatted and never looked into it. www.lovethosetrains.com
Thanks, array is a great idea! I never thought of that :~ Newbie here X| Regarding PictureBoxes, if I want to load multiple images, I have to use one PictureBox for each correct? Is PictureBox or using Graphics class a better way to approach this?
-
Thanks, array is a great idea! I never thought of that :~ Newbie here X| Regarding PictureBoxes, if I want to load multiple images, I have to use one PictureBox for each correct? Is PictureBox or using Graphics class a better way to approach this?
Use and array of picturebox. So no matter how many images you want to load you can extend the picturebox array accordingly.
-
Use and array of picturebox. So no matter how many images you want to load you can extend the picturebox array accordingly.
Hmm, I'm starting to get this :-D Thanks guys!