private void btnCopy_Click(object sender, EventArgs e) { try { Clipboard.Clear(); Thread.Sleep(50); // give it some time to clear Clipboard.SetText(txtDetails.Text); } catch { } }