From Wikibooks, open books for an open world
Jump to navigation Jump to search

Back to Gambas

The Clipboard Program[edit | edit source]

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 
PUBLIC SUB Button2_Click()
Textarea2.Text  = Clipboard.Paste ()
'get the text out of the clipboard