Bonjour,

J'ai un soucis, je n'arrive pas a animer mon Gif de chargement dans un picturebox.
J'ai essayé une méthode que j'ai trouvé sur le net mais rien ...

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
Image img = Globals.LoadingGif;
this.pictureBox1.Image = img;
ImageAnimator.Animate(img, new EventHandler(this.OnFrameChanged));
//Get the next frame ready for rendering.
ImageAnimator.UpdateFrames();
 
private void OnFrameChanged(object o, EventArgs e)
{
    //Force a call to the Paint event handler.
    this.Invalidate();
}
Pouvez vous m'aider ?