bon ok ca marche j'ai ce que je veut avec ce code
for (int i = 0; i < nbFichiers; i++)
{
CheckBox chk = new CheckBox(); // cases a cocher
chk.Size = new Size(15,15);
chk.Checked = true;
panel1.Controls.Add(chk);
chk.Location = new Point(posx * (lPhoto + marge), posy * (hoPhoto + marge));
PictureBox pict = new PictureBox(); // les images
pict.Size = new Size(lPhoto + marge, hoPhoto + marge);
img = new Bitmap(Image.FromFile(fichiersTrouvés[i]), lPhoto, hoPhoto);
panel1.Controls.Add(pict);
pict.Location=new Point(posx*(lPhoto+marge),posy*(hoPhoto+marge) );
pict.Image = img;
posx++; if (posx > (lEcran / lPhoto)-1) { posx = 0; posy++; }
//MessageBox.Show("suivante");
}
MAIS.... si je décommente messagebox j'ai l'affichage premiere image en 1\3 de seconde; je ferme la box autre image 1\3 sec ... etc ok ca vas
mais si je laisse comme ca j'ai par ex 30 images*1\3 sec = 10 segondes sans rien puis tout en bloc.... trop long
ou est l'erreur?
Partager