VB.NET Lessons

Back to Homepage


Lesson 1 - Using the clipboard

Cipboard access in vb.net is made easy with the My.Computer.Clipboard functions.
To put some text on the clipboard you would use the My.Computer.Clipboard.SetText
function.
To read the text you would use the My.Computer.Clipboard.GetText function.

Examples

Set the clipboard to some textbox test:
My.Computer.Clipboard.SetText(Textbox1.Text)
Display the clipboard text in a message box:
MessageBox.Show(My.Computer.Clipboard.GetText)

Download the example

Next lesson