maidinhtai
asked on
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.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
e.KeyCode = Keys.None
or
e.IsInputKey = False
Bob
or
e.IsInputKey = False
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yeah, like I said before, use the keydown event
ASKER
TheLearnedOne, where can I put wher
ASKER
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.
In PreviewKeyDown, but appari's answer will work, too.
Bob
Bob
ASKER
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.
ASKER
--------------------------
Private Sub TextBox1_PreviewKeyDown(By
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.