简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM