Click here to Skip to main content
15,905,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to call a method from an imported dll(not sure which one :P) that will paste what ever is in the clipboard. Basically, what gets called by the OS when someone presses Ctrl + V? I need that method exposed to my program!
Posted
Comments
[no name] 10-Jun-11 4:56am    
What have you tried for this? where you are struck up?

1 solution

Why? You could just use the Clipboard class[^], couldn't you?
 
Share this answer
 
Comments
DominicZA 10-Jun-11 5:44am    
Ok, Im making an app that "extends" the clipboard! It runs in the background! When the person presses Ctrl+1 for example, it will paste what ever I put in there! I cant use send keys to press "^v" because that still sends through the ctrl then stuff gets messed up!
OriginalGriff 10-Jun-11 5:59am    
That's different - and may not be possible in C#. You neither to either introduce a global hook on the keyboard or the GetClipboardData function - probably the later because paste can be initiated from the mouse as well as the keyboard. I don't think it will be too easy. You may find this useful, but I've never tried it (and am not responsible if your PC goes tits-up): http://research.microsoft.com/en-us/projects/detours/

Good luck!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900