Private UndoPast As Boolean = False
Private Sub TextBox1_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If UndoPast Then
e.Handled = True
UndoPast = False
End If
End Sub
Private Sub TextBox1_KeyDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyData = (Keys.Control Or Keys.V) Then
UndoPast = True
End If
End Sub
|