473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How can i get "paste event" from the clipboard?

Hello,

I am tring to write a clipboard spy that catches events from the
clipboard.
I used the SetClipboardViewer api to get events when data is copied
into the clipboard, and also GetClipboardOwner to know where the data
was copied from, but i don't know how to get an event when data is
being pasted... not in my application only, anywhere.

Is there an other way other than a hook on the keyboard?
I don't want to catch all keyboard actions just to know that ctrl+v
was pressed... you can also paste from a menu and not using ctrl+v and
i will miss it...

Thank you!

Feb 1 '07 #1
2 9021
It will take some unmanaged interop to do this, as you have to register your
app to listen for Clipboard events, and use the WndProc method to intercept
them. There's a nice article on how to do this here:

http://www.radsoftware.com.au/articl...rdmonitor.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

The shortest distance between 2 points is a curve.

<ye*****@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
Hello,

I am tring to write a clipboard spy that catches events from the
clipboard.
I used the SetClipboardViewer api to get events when data is copied
into the clipboard, and also GetClipboardOwner to know where the data
was copied from, but i don't know how to get an event when data is
being pasted... not in my application only, anywhere.

Is there an other way other than a hook on the keyboard?
I don't want to catch all keyboard actions just to know that ctrl+v
was pressed... you can also paste from a menu and not using ctrl+v and
i will miss it...

Thank you!

Feb 1 '07 #2
On Feb 1, 2:18 pm, "Kevin Spencer" <unclechut...@nothinks.comwrote:
It will take some unmanaged interop to do this, as you have to register your
app to listen for Clipboard events, and use the WndProc method to intercept
them. There's a nice article on how to do this here:

http://www.radsoftware.com.au/articl...rdmonitor.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composerhttp://unclechutney.blogspot.com

The shortest distance between 2 points is a curve.

<yevr...@gmail.comwrote in message

news:11**********************@l53g2000cwa.googlegr oups.com...
Hello,
I am tring to write a clipboard spy that catches events from the
clipboard.
I used the SetClipboardViewer api to get events when data is copied
into the clipboard, and also GetClipboardOwner to know where the data
was copied from, but i don't know how to get an event when data is
being pasted... not in my application only, anywhere.
Is there an other way other than a hook on the keyboard?
I don't want to catch all keyboard actions just to know that ctrl+v
was pressed... you can also paste from a menu and not using ctrl+v and
i will miss it...
Thank you!- Hide quoted text -

- Show quoted text -

Thank you.
But i already did that... event is raised only when copy is done, not
paste.
Feb 1 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Add and Paste | last post by:
Dear Access developers, I have a lot of cut and pasting to do from Excel to an Access form. But instead of just pasting, I want to "add then paste" the value. Does anybody have a way to do this?...
1
by: Nicolas Verhaeghe | last post by:
I am overtired of having to right click and select "Paste as HTML" manually. Could it be possible to make this the default when doing Ctrl+V? Thanks a lot for your help!
1
by: kimso.zhao | last post by:
Hi all, When I tried reading user command from console, I use "select" to wait for user input in order to improve efficiency. But when it comes to dealing with user pasting a command, there is a...
5
by: Jason | last post by:
Hello, I am trying to dynamically create a table, then set its <td>'s onclick: var table = document.createElement("table"); var row = table.insertRow(-1); var td = row.insertCell(-1);...
1
by: hartattack72 | last post by:
Hello. I am new to access, but have had great success in creating an application. My one user is requesting a function to save time in data entry... and I am stumped being the plebian that I am. ...
7
kcdoell
by: kcdoell | last post by:
Good morning everyone: I created a form and set the default view as a continuous form. Basically the form is displaying records in which the user can add or edit new ones. The record source for...
1
by: aeconsta | last post by:
I want to add images to my database by copying and pasting the image. I am using MS SQL Server Express 2008 and MS VB Express 2008. I want to create a simple program that displays data including...
3
by: Kappucino XL | last post by:
Hi There.. What is the Macro or Code Builder Event, For Copying And Pasting. i.e: I need to click on a field in a textbox, and it must be copied jus by clicking on it. Then I want to click on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.