Solved

Clipboard Paste or CTRL+V

Posted on 2002-04-05
4
2,001 Views
Last Modified: 2008-02-01
I need to paste from the Clipboard anywhere in Windows. In other words I either want to have a Delphi command that would take the Clipboard text and paste it or to simulate CTRL+V and effectively paste the clipbaord text. This is outside of my Delphi Application without it having focus. I would really appreciate some examples.
0
Comment
Question by:skynergy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:Dennis9
ID: 6920561
You could use this:

procedure TMainform.Button1Click(Sender: TObject);
begin
  Keybd_event(VK_CONTROL, 0, 0, 0);
  Keybd_event(Byte('V'), 0, 0, 0);
  Keybd_event(Byte('V'), 0, KEYEVENTF_KEYUP, 0);
  Keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);
end;

Cheers Dennis
0
 
LVL 1

Accepted Solution

by:
Dennis9 earned 50 total points
ID: 6920563
You could use this:

procedure TMainform.Button1Click(Sender: TObject);
begin
  Keybd_event(VK_CONTROL, 0, 0, 0);
  Keybd_event(Byte('V'), 0, 0, 0);
  Keybd_event(Byte('V'), 0, KEYEVENTF_KEYUP, 0);
  Keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);
end;

Cheers Dennis
0
 

Author Comment

by:skynergy
ID: 6920615
Thanx that's excellent!
0
 

Author Comment

by:skynergy
ID: 6920620
Thanx that's excellent Dennis!
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question