[英]C# Cut Copy Paste and working with a Class
Currently doing a wee project and been asked if i can include cut copy paste functions. 当前正在做一个小项目,并被问到我是否可以包括剪切副本粘贴功能。
Wondering the easiest way to do this going forward. 想知道进行此操作的最简单方法。
It is multiple textboxes, a location and a listview. 它是多个文本框,一个位置和一个列表视图。
At the moment i have it copying out a large string but can not get a paste to work. 目前,我已经复制了一个大字符串,但无法粘贴工作。
Wondering if their is an easier way to perform this? 想知道他们是否是执行此操作的更简单方法?
You can manage the clipboard using the System.Windows.Forms.Clipboard
class (or System.Windows.Clipboard
for WPF) : https://msdn.microsoft.com/en-us/library/system.windows.forms.clipboard(v=vs.110).aspx 您可以使用System.Windows.Forms.Clipboard
类(或WPF的System.Windows.Clipboard
)来管理剪贴板: https : //msdn.microsoft.com/zh-cn/library/system.windows.forms.clipboard( v = vs.110).aspx
For example, you can get the text stored in the clipboard by using the GetText()
method, or you can store a text using the SetText()
method. 例如,您可以使用GetText()
方法获取存储在剪贴板中的文本,也可以使用SetText()
方法存储文本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.