Solved

Clipboard Paste or CTRL+V

Posted on 2002-04-05
4
1,977 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 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