如何调用系统的CTRL+C加CTRL+V,就是点击那个按钮能调用系统的这两个按钮而实现粘贴复制。

解决方案 »

  1.   

    sendmessage  按键组合,自己去查一下资料吧,很多的
      

  2.   

    An application sends the WM_COPY message to an edit control or combo box to copy the current selection to the clipboard in CF_TEXT formatAn application sends a WM_PASTE message to an edit control or combo box to copy the current content of the clipboard to the edit control at the current caret position. Data is inserted only if the clipboard contains data in CF_TEXT format.
      

  3.   

    发消息
    或者
    用action组件,自带一些标准操作功能
      

  4.   


    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        edt1: TEdit;
        btn1: TButton;
        procedure btn1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}
    uses Clipbrd;
    //点完btn1Click后,在系统其它地方粘贴一下试试
    procedure TForm1.btn1Click(Sender: TObject);
    var
      clip: TClipboard;
    begin
      clip := TClipboard.Create;
      try
        clip.AsText := edt1.Text;
      finally
        clip.Free;
      end;
    end;end.
      

  5.   

    简单的放置一个ActionList,双击添加New Standard Action
    或者如下代码:
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      if Sender is TCustomEdit then
        TCustomEdit(Sender).CopyToClipboard;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      if Sender is TCustomEdit then
        TCustomEdit(Sender)..PasteFromClipboard;
    end;