
private void button3_Enter(object sender, EventArgs e)
{
foreach (Control tempcon in this.Controls)
{
switch (tempcon.GetType().ToString())
{
case "System.Windows.Forms.Label":
break;
case "System.Windows.Forms.Panel":
break;
case "System.Windows.Forms.GroupBox":
break;
case "System.Windows.Forms.Button":
tempcon.Enabled = false;
break;
}
}
Thread.Sleep(3000);
foreach (Control tempcon in this.Controls)
{
switch (tempcon.GetType().ToString())
{
case "System.Windows.Forms.Label":
break;
case "System.Windows.Forms.Panel":
break;
case "System.Windows.Forms.GroupBox":
break;
case "System.Windows.Forms.Button":
tempcon.Enabled = true;
break;
}
}
}