The Easy way to Cut Copy and Paste


The Easy way to Cut Copy and Paste 

            
            procedure TForm1.Cut1Click(Sender: TObject);
            begin
              SendMessage (ActiveControl.Handle, WM_Cut, 0, 0);
            end;
            
            procedure TForm1.Copy1Click(Sender: TObject);
            begin
              SendMessage (ActiveControl.Handle, WM_Copy, 0, 0);
            end;
            
            procedure TForm1.Paste1Click(Sender: TObject);
            begin
              SendMessage (ActiveControl.Handle, WM_Paste, 0, 0);
            end;
            
            If you are developing a MDI application, you will need to make sure 
            that the message is sent to the active child by using: 
            ActiveMDIChild.ActiveControl.Handle