|
-
August 2nd, 2009, 04:51 PM
#1
Prevent Paste or Trap Paste into Edit Box
Found how to do it:
In the key down event for a text or rich text box:
If (e.Control) And (e.KeyCode = Keys.V) Then e.SuppressKeyPress = True
To prevent pasting for all text boxes on your form, set form KeyPreview to true and add the above code to form key down event.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|