private void button2_Click(object sender, EventArgs e)
{
System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(delegate() {
for (int i = 0; i < 6; i++)
{
System.Threading.Thread.Sleep(3000);
MessageBox.Show("I'm in thread");
}
}));
t.Start();
MessageBox.Show("end of click");
}