using System . Threading;
public void DoWork()
{
Thread . Sleep( 5000 );
Invoke( new EventHandler (DoInvoke));
}
private void DoInvoke( object sender , EventArgs e)
{
button1 . Enabled = true ;
}
private void button1_Click( object sender , EventArgs e)
{
button1 . Enabled = false ;
Thread vThread = new Thread ( new ThreadStart (DoWork));
vThread . Start();
}