Home » » Source Code Sederhana Cut-Copy-Paste Pada Visual Basic

Source Code Sederhana Cut-Copy-Paste Pada Visual Basic

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 : 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'copy
Private Sub Command1_Click()
    Clipboard.SetText Text1.SelText
End Sub
'paste
Private Sub Command2_Click()
    Text1.SelText = Clipboard.GetText()
End Sub
'cut
Private Sub Command3_Click()
    Clipboard.SetText Text1.SelText
    Text1.SelText = ""
End Sub
Untuk lebih jelasnya Download Source Code Sederhana Cut-Copy-Paste Pada Visual Basic

0 komentar:

Add me on Facebook
Follow us on Twitter
Recommend us on Google Plus
Subscribe me on RSS
notifikasi
close