private void button1_Click(object sender, System.EventArgs e) { // Create a new instance of the DataObject interface. IDataObject data = Clipboard.GetDataObject(); // If the data is text, then set the text of the // TextBox to the text in the Clipboard. if (data.GetDataPresent(DataFormats.Text)) textBox1.Text = data.GetData(DataFormats.Text).ToString(); }
取得剪贴板上的内容
最新推荐文章于 2024-04-15 14:40:44 发布