Hi,
I've got a fast question, is there any possibility to check what kind of file is now loaded to for example my pictureBox1?
and another one, how can I remove image from pictureBox ? so later I can add there another one... Using null won't help :(
thanks
Greg.
Loading
Bechir BejaouiPosted Dec 11, 2008, 6:13 PM
you do as follow
ImageList oImgList = new ImageList();
oImgList.Items.Add(Image1);
.
.
oImgList.Items.Add(Imagen);
then you can refer your images by the index, I mean
if(PictureBox.Iamge = oImgList.Images[index1] ..... patati patata barwet barwet.....
;-{)
GaLaZPosted Dec 11, 2008, 11:12 AM
but now I have to face another problems with that...
1. I need to check if (in anyone of my pictureBoxes are the same pictures...)
if (pictureBox1.image = logo.gif && pictureBox2. image= logo.gif){}
how could I solve it?
second...
2. I've got four picture Boxes with loaded in images. Next I need to remove te pictures, and make sure that those pictureBoxes are ready to load in new images :)
thanks for help again
Bechir BejaouiPosted Dec 11, 2008, 10:53 AM
strnig path = pictureBox1.ImageLocation;
For the second question
System.Drawing.Image image = System.Drawing.Image.FromFile(thenewpathhere);
pictureBox1.Image = image;
that's it