Article View: borland.public.cppbuilder.nativeapi
Article #1215Re: How to paste the text in the clip board in to other application?
From: Vladimir Stefanovic
Date: Tue, 09 Oct 2007 11:06
Date: Tue, 09 Oct 2007 11:06
26 lines
1578 bytes
1578 bytes
> Would anybody teach me?
#include <ClipBrd.hpp>
// ...
void __fastcall TForm1::Button1Click(TObject *Sender)
{
HANDLE notepad = FindWindow( "Notepad", 0 );
if ( notepad )
{
Clipboard()->AsText = "Test";
BringWindowToTop( notepad );
keybd_event( VK_CONTROL, 0, 0, 0 );
keybd_event( 'V', 0, 0, 0 );
keybd_event( 'V', 0, KEYEVENTF_KEYUP, 0 );
keybd_event( VK_CONTROL, 0, KEYEVENTF_KEYUP, 0 );
}
else
{
ShowMessage( "Please, open notepad first." );
}
}
--
Best Regards,
Vladimir Stefanovic
Technical Details
Message-ID:
<470b5fa8@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<470aff65@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a7950ca98ad5a21f X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@sbb.co.yu> Newsgroups: borland.public.cppbuilder.nativeapi References: <470aff65@newsgroups.borland.com> Subject: Re: How to paste the text in the clip board in to other application? Date: Tue, 9 Oct 2007 13:06:19 +0200 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 195.252.72.241 Message-ID: <470b5fa8@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1191927720 195.252.72.241 (9 Oct 2007 04:02:00 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail