Source code berikut untuk memfungsikan Cut-Copy-Paste pada Visual
Basic. Sama halnya dengan konsep Cut-Copy-Paste yang sudah sering kali
kita gunakan saat menggunakan Windows, meskipun source code berikut
digunakan untuk Cut-Copy-Paste pada textbox alias pada teks/karakter
bukan pada file.
Buat 1 project dengan :
1 Form
1 TextBox
3 CommandButton
Source code pada Form :
Untuk lebih jelasnya Download Source Code Sederhana Cut-Copy-Paste Pada Visual Basic
Buat 1 project dengan :
1 Form
1 TextBox
3 CommandButton
Source code pada Form :
01 | 'copy |
02 | Private Sub Command1_Click() |
03 | Clipboard.SetText Text1.SelText |
04 | End Sub |
05 |
06 | 'paste |
07 | Private Sub Command2_Click() |
08 | Text1.SelText = Clipboard.GetText() |
09 | End Sub |
10 |
11 | 'cut |
12 | Private Sub Command3_Click() |
13 | Clipboard.SetText Text1.SelText |
14 | Text1.SelText = "" |
15 | End Sub |