Disable copy-paste in textbox

Paste this code into your keydown event
====================================================================================
Private Sub Txtamount_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Txtamount.KeyDown
'Suppress ctrl-c and ctrl-v
If e.Control AndAlso (e.KeyCode = Keys.V OrElse e.KeyCode = Keys.C) Then e.SuppressKeyPress = True

End Sub
============================================================

No comments: