I have a Winforms app in C# that calls calls a method asynchronously and uses a callback. I would like to display an animated gif to let the end user know that work is being done. I would like to have the animated gif hover over the center of the form.
How can I do this?
Update: Thanks. I guess the step I was missing was to use a Picture Box to hold the gif. The following seems to be doing the trick of showing the gif and like jmatthews3865 said below I can just set the visible property of the PictureBox to false to hide it.
private ShowAnimatedGif()
{
PictureBox pb = new PictureBox();
this.Controls.Add(pb);
pb.Left = (this.Width / 2) - (pb.Width / 2);
pb.Top = (this.Height / 2) - (pb.Height / 2);
pb.Image = Resources.AnimatedGifHere;
pb.Visible = true;
}