Bonjour,

Et bien décidemment, j'ai un peu de mal en C# mais c'est quand même génial.

J'ai une progressbar progressbar1 que je fais avancer dans la fonction Miniaturise.

Fonction miniaturise
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
publicvoid Miniaturise(string [] my_pics, string my_path)
{
progressBar1.Maximum=100;
for (int i = 0; i < my_pics.Length; i++)
{
one_pic = my_path + "\\" + my_pics[i]; 
label2.Text = my_path + "\\" + my_pics[i];
Bitmap bmp = newBitmap(one_pic);
//bmp.Save(my_path + "\\" + i + ".jpg");
 
#Ici a prend les valeurs de 0 à 100
 
float a = (float)(i) / (float) my_pics.Length * 100F;
 
progressBar1.Increment((int)a);
this.Update();
}
}
Ma progressbar avance bien, mais à 50 environ, elle est déjà arriver au maximum !!!!!!!

Pour quelle raison ???