【C#学习笔记】从粘贴板复制文本
2013-10-15 10:08
375 查看
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication5 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { IDataObject idata=Clipboard.GetDataObject(); if (idata.GetDataPresent(DataFormats.Text)) textBox1.Text = (string)idata.GetData(DataFormats.Text); } } }
相关文章推荐
- 【C#学习笔记】文本复制到粘贴板
- 【C#学习笔记】文本复制到粘贴板
- 学习笔记--C#深复制和浅复制
- 黑马程序员之 C#学习笔记:结构体是复制传递的经典案例
- C#学习笔记- 浅谈数组复制,排序,取段,元组
- C#文本处理(String)学习笔记
- 黑马程序员之C#学习笔记:数组的复制四种方法
- 【C#学习笔记】自我复制
- 【C#学习笔记】自我复制
- C#复制文件和文件夹(学习笔记)
- (原创)c#学习笔记09--定义类08--浅度和深度复制
- C#学习笔记__文本编辑、列表控件的使用示例
- C# 学习笔记 数组的复制和array.copyto()
- Python标准库学习笔记-文本
- C#学习笔记之C#调用MySql数据库
- (原创)c#学习笔记08--面向对象编程简介03--Windows应用程序中的OOP
- C#学习笔记2:变量及占位符
- C#学习笔记:CheckedListBox控件的用法
- 38、我的C#学习笔记4
- C# 参考:反射 -- 学习笔记整理,概念与应用