Back to Gambas

The Clipboard Program

edit

This program shows you the use of the clipboard in Gambas. You need 2 commandbuttons and 2 textareas to get the program going.

The Code:

' Gambas class file
PUBLIC SUB Button1_Click()
Clipboard.Copy (Textarea1.Text)
'Copy Text into the Clipboard 
END
PUBLIC SUB Button2_Click()
Textarea2.Text  = Clipboard.Paste ()
'get the text out of the clipboard
END