🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1177

Re: How to paste the text in the clip board in to other application?

#1177
From: Emmanuel
Date: Fri, 19 Oct 2007 03:33
31 lines
1742 bytes
Success now thank
"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: <47182504@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <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 11:33:54 +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.35.228
Message-ID: <47182504@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1192764676 59.36.35.228 (18 Oct 2007 20:31:16 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail