Article View: borland.public.cppbuilder.nativeapi
Article #1163Re: How to paste the text in the clip board in to other application?
From: Emmanuel
Date: Thu, 18 Oct 2007 17:41
Date: Thu, 18 Oct 2007 17:41
31 lines
1613 bytes
1613 bytes
Fail
"Vladimir Stefanovic" <antivari@sbb.co.yu> д���ʼ�
news:470b5fa8@newsgroups.borland.com...
> > 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:
<47179a22@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<470aff65@newsgroups.borland.com> <470b5fa8@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 From: "Emmanuel" <emmanuel@erphk.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <470aff65@newsgroups.borland.com> <470b5fa8@newsgroups.borland.com> Subject: Re: How to paste the text in the clip board in to other application? Date: Fri, 19 Oct 2007 01:41:17 +0800 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 NNTP-Posting-Host: 59.36.142.57 Message-ID: <47179a22@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1192729122 59.36.142.57 (18 Oct 2007 10:38:42 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail