How do I get and send text to the clipboard?
I'd like the user to press a button and then retrieve the text (if it is text) and paste it into a textbox.
Clipboard
Started by dirkfirst, Jul 13 2006 03:15 PM
3 replies to this topic
#1
Posted 13 July 2006 - 03:15 PM
|
|
|
#2
Posted 13 July 2006 - 04:39 PM
You want the System.Windows.Forms.Clipboard class. Or, if you're using VB.NET 2.0 *(or C# 2.0, and have referenced Microsoft.VisualBasic.MyServices), you can use My.Computer.Clipboard.
#3
Posted 14 July 2006 - 07:59 AM
Thanks!
I use
but what if the item in the clipboard isn't text? Will I receive an exception?
I use
textBox1.Text = System.Windows.Forms.Clipboard.GetText();
but what if the item in the clipboard isn't text? Will I receive an exception?
#4
Posted 14 July 2006 - 09:06 AM
dirkfirst said:
Thanks!
I use
but what if the item in the clipboard isn't text? Will I receive an exception?
I use
textBox1.Text = System.Windows.Forms.Clipboard.GetText();
but what if the item in the clipboard isn't text? Will I receive an exception?


Sign In
Create Account


Back to top









