PDA

View Full Version : Copy to clipboard in vb


Rappa
02-05-2006, 05:38 AM
I have a textarea that displays a generated code:

and a buton below it to copy it

how to i get the code from the textarea copyed to there clipboard for pasteing when they click the copy button?

smeagol
02-05-2006, 06:14 AM
Use the Clipboard object.

'To set the text on the clipboard
Clipboard.SetText (YourTextBox.Text)

'Retrieve the text on the clipboard by using the following
Clipboard.GetText()

Rappa
02-05-2006, 07:06 AM
thxxx