Geeks With Blogs

News


Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done

 

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

        '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

 

Posted on Friday, October 22, 2010 10:04 AM WinForms | Back to top


Comments on this post: windows.controls textbox allow control-v, control-c, control-x, control-a

# re: windows.controls textbox allow control-v, control-c, control-x, control-a
Requesting Gravatar...
Your article makes very moved, I hope you continue to write a better article. Please pay attention
Left by ash shoes on Apr 30, 2011 2:59 AM

# re: windows.controls textbox allow control-v, control-c, control-x, control-a
Requesting Gravatar...
Your article very good, I like, thank you for sharing,
Left by stay younger on Jun 15, 2011 9:30 PM

Your comment:
 (will show your gravatar)


Copyright © Rodney Vinyard | Powered by: GeeksWithBlogs.net