Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想检测用户何时将某些内容粘贴到文本框中。我想检测用户是使用鼠标还是键盘。
这是vb6
Karl E. Peterson 的HookXP是一个非常酷的代码示例,它向您展示了如何捕获粘贴事件以及许多其他有趣的东西。我对其进行了修改和精简,并且能够按照您的要求进行操作,因此我可以保证它可以工作。我会把它贴在这里,但我会违反他的执照。
我认为这样做的唯一方法是对文本框进行子类化并检测 WM_PASTE 事件。