Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
If keyData = (Keys.Control Or Keys.V) Then
Return True
Else
Return MyBase.ProcessCmdKey(msg, keyData)
End If
End Function
ตัวอย่าง Code (VB.NET)
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.ContextMenu = New ContextMenu()
End Sub
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
If keyData = (Keys.Control Or Keys.V) Then
Return True
Else
Return MyBase.ProcessCmdKey(msg, keyData)
End If
End Function
End Class