private void button1_Click(object sender, System.EventArgs e)
        {
            PasteData();
        }

        private void PasteData()
        {
            IDataObject iData = Clipboard.GetDataObject();

            // 探测数据是否是可以使用的格式
            if(iData.GetDataPresent(DataFormats.Text))
            {
                string str = (String)iData.GetData(DataFormats.Text);
                textBox1.Text = str;
            }
        }

相关文章:

  • 2021-08-31
  • 2022-12-23
  • 2022-02-01
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-03
猜你喜欢
  • 2021-07-31
  • 2022-12-23
  • 2021-11-15
  • 2021-06-08
相关资源
相似解决方案