Task.Run keep your UI working while waiting Mike26/09/2016 private async void button2_Click(object sender, EventArgs e) { await Task.Run(() => { Thread.Sleep(1000); }); MessageBox.Show("Hi from the UI thread!"); }