By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,714 Members | 1,345 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,714 IT Pros & Developers. It's quick & easy.

Copy and Paste in Visual C#

P: n/a
Hello,

I have a copy button and a paste button. What code should I add to the copy
button and the paste button to do it's work?

Thanks,

Matt
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Matt" <Ma**@discussions.microsoft.com> wrote:
I have a copy button and a paste button.
What code should I add to the copy
button and the paste button to do it's
work?


You don't explain what you want to copy and paste, but I expect you
should be using the Clipboard methods GetDataObject and SetDataObject.

P.
Nov 16 '05 #2

P: n/a
If you're just copying text to and from a textbox, then the textbox methods
"Copy" and "Paste" are a shortcut to the clipboard.
e.g.,
void Copy()
{
this.MyTextbox.Copy();
}
void Paste()
{
this.MyTextbox.Paste();
}

"Matt" wrote:
Hello,

I have a copy button and a paste button. What code should I add to the copy
button and the paste button to do it's work?

Thanks,

Matt

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.