'--------------------------------------------------------

        'text box class

        '--------------------------------------------------------

 

Option Explicit On

Option Strict On

 

Public Class TextBox2

    Inherits System.Windows.Forms.TextBox

    Private Sub txtBarcode_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp

 

        '--------------------------------------------------------

        'allow control-v, control-c, control-x, control-a

        '--------------------------------------------------------

        If e.Control Then

            Select Case e.KeyCode

                Case Keys.V

                    MyBase.Paste()

                Case Keys.C

                    MyBase.Copy()

                Case Keys.X

                    MyBase.Cut()

                Case Keys.A

                    MyBase.SelectAll()

            End Select

        End If

 

    End Sub

End Class

 

        '--------------------------------------------------------

        'text box client

        '--------------------------------------------------------

        'Me.txtComment = New System.Windows.Forms.TextBox

        Me.txtComment = New TextBox2