Ctrl+X, Ctrl+V, Ctrl+C or Cut, Copy, Paste using the keyboard -> What are their keycode or keychar?

The title says all. For example, what is the keychar or keycode of Ctrl+X. Thank you.
LVL 3
maidinhtaiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PockyMasterCommented:
try the following in the keydown event  

If e.Control And e.KeyCode = Keys.X Then

        End If
maidinhtaiAuthor Commented:
Hi PockyMaster. This is a clear example:
----------------------------------------
Private Sub TextBox1_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles TextBox1.PreviewKeyDown
         If e.Control And e.KeyCode = Keys.V Then
             'Do nothing
    End Sub
-----------------------------------------
What I need is when the user press Ctrl+V, nothing will happen. That means the text in Clipboard is not pasted into textbox1.
Bob LearnedCommented:
e.KeyCode = Keys.None

   or

e.IsInputKey = False

Bob
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

appariCommented:
you have to do it in Keydown event

    Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        If e.Control And e.KeyCode = Keys.V Then
            e.SuppressKeyPress = True
            e.Handled = True
        End If
    End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PockyMasterCommented:
Yeah, like I said before, use the keydown event
maidinhtaiAuthor Commented:
TheLearnedOne, where can I put wher
maidinhtaiAuthor Commented:
TheLearnedOne, where can I put "e.KeyCode = Keys.None" or "e.IsInputKey = False"? If I put it to KeyDown event, so appri's answer is OK.
Bob LearnedCommented:
In PreviewKeyDown, but appari's answer will work, too.

Bob
maidinhtaiAuthor Commented:
In the Subroutine that handles  the PreViewKeyDown event, e.KeyCode is readonly, and e.IsInputKey = False seems useless (I mean it does nothing at all). I try changing e.IsInputKey = False to e.IsInputKey = True but there nothing different, too.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.