You can add a class like this to your project:
Class MyTextBox : Inherits TextBox
Public Enum ContextCommands
WM_CUT = &H300
WM_COPY = &H301
WM_PASTE = &H302
End Enum
Public Class ContextCommandEventArgs
Inherits EventArgs
Public Property Command As ContextCommands
End Class
Event OnCut(sender As Object, e As ContextCommandEventArgs)
Event OnCopy(sender As Object, e As ContextCommandEventArgs)
Event OnPaste(sender As Object, e As ContextCommandEventArgs)
Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc(m)
Select Case m.Msg
Case ContextCommands.WM_CUT
RaiseEvent OnCut(Me, New ContextCommandEventArgs() With {.Command = ContextCommands.WM_CUT})
Case ContextCommands.WM_COPY
RaiseEvent OnCopy(Me, New ContextCommandEventArgs() With {.Command = ContextCommands.WM_COPY})
Case ContextCommands.WM_PASTE
RaiseEvent OnPaste(Me, New ContextCommandEventArgs() With {.Command = ContextCommands.WM_PASTE})
End Select
End Sub
End Class
Then you can replace all occurrences of "TextBox" in the Designer.vb files with "MyTextBox". Then you will have access to 3 new events for Cut, Copy and Paste. You can handle them like this:
Private Sub TextBox1_OnTextCommand(sender As Object, e As MyTextBox.ContextCommandEventArgs) _
Handles TextBox1.OnCut, TextBox1.OnPaste, TextBox1.OnCopy
MessageBox.Show("Activated " & e.Command.ToString())
End Sub
Notice how I've chosen to handle all 3 events in one function in this case, but you could handle them in separate functions as well. I noticed that the cut command seems to also cause a copy command event, but I will assume for now that you can deal with that slight complication.