|
-
Apr 5th, 2007, 05:20 PM
#1
[RESOLVED] [2005] Clearing clipboard after paste
I have an app where I allow the user to copy some data onto the clipboard, so that it can be dropped onto a text form or maybe a login form etc.
Is there a way that I can clear the clipboard after the data is pasted? So I effectively want to allow a 'paste once'. To do this I would need to detect if a paste event has occurred somewhere on the users desktop/computer. (Detecting a mouse up/down is not specific enough). Maybe I need to detect a CTRL-V too.
Is this possible?
-
Apr 5th, 2007, 05:26 PM
#2
Re: [2005] Clearing clipboard after paste
I haven't tried it but does this work or something similar? Just add it after the 1st paste or something.
vb Code:
My.Computer.Clipboard.Clear()
-
Apr 5th, 2007, 05:28 PM
#3
Re: [2005] Clearing clipboard after paste
That is how I would clear the clipboard. It is detecting a 'paste event' that I am uncertain about.
-
Apr 9th, 2007, 03:17 PM
#4
Re: [2005] Clearing clipboard after paste
Can I detect the keyboard and mouse activity when the app is not focussed?
-
Apr 9th, 2007, 03:36 PM
#5
Frenzied Member
Re: [2005] Clearing clipboard after paste
Yea. With a keyboard and mouse hook.
http://www.codeproject.com/csharp/globalhook.asp
Download the source files at that page.
It's C# but should be easy to convert.
-
Apr 9th, 2007, 03:40 PM
#6
Re: [2005] Clearing clipboard after paste
ok, perfect, I'll give it a go.
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
|