如何将“文本框”的“内容”用“语句”来实现放到“剪切版”上????

解决方案 »

  1.   

    Copies the selected text in the edit control to the Clipboard in CF_TEXT format.Delphi syntax:procedure CopyToClipboard;C++ syntax:void __fastcall CopyToClipboard(void);DescriptionUse CopyToClipboard to replace the contents of the Clipboard with the selected text. CopyToClipboard does not clear the Clipboard if no text is selected. If no text is selected, CopyToClipboard does nothing.Note: Calling CopyToClipboard does the same thing as sending the edit control a WM_COPY message.
      

  2.   

    his example uses an edit box, a rich edit control, and a button on a form. When the user clicks the button, text is copied from the rich edit control and pasted into the edit box.  Note that only the text is pasted. If the rich edit control includes any formatting information that is not pasted into the edit control.  If the destination were a rich edit control, the formatting information would be copied as well.procedure TForm1.Button1Click(Sender: TObject);begin
      RichEdit1.SelectAll;
      RichEdit1.CopyToClipboard;
      Edit1.Clear;
      Edit1.PasteFromClipboard;
      RichEdit1.SetFocus;end;