//粘贴
        private void tsbPaste_Click(object sender, EventArgs e)
        {
            IDataObject iData = Clipboard.GetDataObject();
            if (iData.GetDataPresent(DataFormats.Text))
            {
                txtContent.Text = (String)iData.GetData(DataFormats.Text);
            }

        }

        //复制
        private void tsbCopy_Click(object sender, EventArgs e)
        {
            if (txtContent.Text != "")
            {
                Clipboard.SetDataObject(txtContent.Text);
                MessageBox.Show("已复制到剪贴板!");
            }
        }

  

相关文章:

  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
猜你喜欢
  • 2022-01-02
  • 2022-01-03
  • 2021-11-30
  • 2021-12-31
  • 2022-01-27
  • 2021-05-22
相关资源
相似解决方案