copy/paste event listener in C#

2019-01-12 07:27发布

I'm new to C# (I'm used to Java) and am trying to implement a listener that can run in the background of a Windows XP computer and be able to see when a user does a copy, cut, or paste operation.
I found this page and have attempted to implement that listener, but I keep having problems.

My question is two fold: one, will the listener on this page solve my problem? and if so, any tips on implementing it? I'm getting:

The type or namespace name 'DragDropOrCopyPasteEventArgs' could not be found (are you missing a using directive or an assembly reference?)

I've tried attaching the necessary assembly reference, but I don't seem to have the correct dll.

Thanks a ton in advance. (before anyone asks, I am not writing a virus, its a writing analyzer)

标签: c# copy-paste
1条回答
干净又极端
2楼-- · 2019-01-12 07:59

For copy listener please look into this question here and an article here.

As for the paste event as discussed in the above thread there seems to be some confusion as clipboard listener does not provides any feedback on pasting. You may have to install global hooks to capture CTRL + V and mouse context menu.

for using key hook please read this CodeProject article.

for listening to mouse events and movement please visit this another CodeProject article and this msdn page about WIN 32 hooks.

查看更多
登录 后发表回答