0

I am currently creating a small application that processes a line of text into several ouput lines using a C# Windows Form
What I am looking for is a way to duplicate the actions of manually copying text through Ctrl+C, or right click, Copy, by the click of a button.
In other words, how do I write to the clipboard/area that ctrl+c's text is stored?
Thanks,
Peter

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by goldenpete
1

CTRL+C stores the selected item to the Clipboard, which has a class.

Clipboard.SetText("Text You Want in Clipboard");

Edited by jmurph333: n/a

0

CTRL+C stores the selected item to the Clipboard, which has a class.

Clipboard.SetText("Text You Want Copied");
1

To Store To ClipBoard read jmurph333's solution to retrieve clipboard text us Clipboard.GetText();

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.