473,698 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 SetClipboardVie wer api to get events when data is copied
into the clipboard, and also GetClipboardOwn er 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 9069
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.goo glegroups.com.. .
Hello,

I am tring to write a clipboard spy that catches events from the
clipboard.
I used the SetClipboardVie wer api to get events when data is copied
into the clipboard, and also GetClipboardOwn er 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...@n othinks.comwrot e:
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.bl ogspot.com

The shortest distance between 2 points is a curve.

<yevr...@gmail. comwrote in message

news:11******** **************@ l53g2000cwa.goo glegroups.com.. .
Hello,
I am tring to write a clipboard spy that catches events from the
clipboard.
I used the SetClipboardVie wer api to get events when data is copied
into the clipboard, and also GetClipboardOwn er 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
3153
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? Existing code would be appreciated! In other words, I'd like to right click on a form text box and add the value stored in the clipboard to the existing value which is in the text box.
1
1246
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
1835
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 problem. Only the first character of the pasted command can be displayed. But the command is actually there, if you typed any one more key, the whole pasted command will be displayed. Here is the code. Do you have any way to get through this?...
5
6493
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); td.onclick = myfunction; function myfunction(event) { alert(event);
1
2272
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. My application is used to enter land owner information by parcel (40 acre lots). For example: for parcel #1 someone owns the land, someone owns the mineral rights, someone owns the water rights, etc, etc... and we inventory about 36 square miles of...
7
8692
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 this form is a query that I built that is based on a table. I have been working on this for several weeks and now I have been told that many times when a user wants to create a new record, much of the information that is displayed in a...
1
4791
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 images (.jpg) of items and text that describes characteristcs about the items. The images are currently in a MS Word table. I would like to simply convert the table into an SQL database, but seems not possible. Failing that, I would like to copy...
3
23046
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 an empty textbox, and the field I copied must get pasted... How do I go About doing this? XL
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8856
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.