You could use a timer to achieve this.
using System;
using System.Windows.Forms;
namespace WindowsFormsApplicationImageHide
{
public partial class Form1 : Form
{
System.Timers.Timer timer;
public Form1()
{
timer = new System.Timers.Timer(5000);
timer.Elapsed += timer_Elapsed;
InitializeComponent();
}
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
pictureBox1.Visible = false;
}
private void button1_Click(object sender, EventArgs e)
{
pictureBox1.Visible = true;
timer.Start();
}
}
}
When you press the button the picture box containing an image
becomes visible and the timer is started.
After 5000 ms the timer elapses and the picture box becomes invisible.