Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect a Paste operation in a textbox?

I want to detect when the user pasted something into the textbox. I want to detect it whether the user used the mouse or keyboard.

This is vb6

like image 913
AngryHacker Avatar asked Nov 02 '25 09:11

AngryHacker


1 Answers

Karl E. Peterson's HookXP is a pretty cool code sample that shows you how to capture a paste event, along with a bunch of other interesting stuff. I modified and stripped it down a bit, and was able to do what you asked, so I can vouch that it works. I'd post it here, but I'd be violating his license.

like image 152
raven Avatar answered Nov 04 '25 20:11

raven