private void btnCopy_Click(object sender, System.EventArgs e)
{
string text = this.txtContent.SelectedText;
Clipboard.SetDataObject(text);
}
private void btnPaste_Click(object sender, System.EventArgs e)
{
IDataObject data = Clipboard.GetDataObject();
if (data.GetDataPresent(DataFormats.Text))
{
this.txtPaste.Text = data.GetData(DataFormats.Text).ToString();
}
}