Textbox should not accept data from clipboard like "when u press ctrl+V, data should not paste to textbox

Chikul
Posted by Chikul under VB.NET category on | Views : 2243
Public Class ValidPaste

'On "KeyPress" Event, Clear the Clipboard
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
System.Windows.Forms.Clipboard.Clear()
End Sub

End Class

Comments or Responses

Login to post response