这是只有一个文本private void copy_Click(object sender, EventArgs e)//复制
{
Clipboard.SetDataObject(textBox1.SelectedText);
} private void jianqie_Click(object sender, EventArgs e)//剪切
{
Clipboard.SetDataObject(textBox1.SelectedText);
textBox1.SelectedText = String.Empty;
} private void zhantie_Click(object sender, EventArgs e)//粘贴
{
IDataObject ida = Clipboard.GetDataObject();
if (ida.GetDataPresent(DataFormats.Text))
{
textBox1.SelectedText = (string)ida.GetData(DataFormats.Text);
}
} private void qingkong_Click(object sender, EventArgs e)//清空
{
textBox1.Clear();
}
如果有多个文本关联,该怎样写
另外求大神讲解下粘贴的原理!
小的谢过了!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货