Советы по Delphi

         

Копирование в буфер обмена


Две вспомогательных процедуры:

    procedure CopyButtonClick(Sender: TObject);
begin
If ActiveControl is TMemo then TMemo(ActiveControl).CopyToClipboard; If ActiveControl is TDBMemo then TDBMemo(ActiveControl).CopyToClipboard; If ActiveControl is TEdit then TEdit(ActiveControl).CopyToClipboard; If ActiveControl is TDBedit then TDBedit(ActiveControl).CopyToClipboard; end;

procedure PasteButtonClick(Sender: TObject);
begin
If ActiveControl is TMemo then TMemo(ActiveControl).PasteFromClipboard; If ActiveControl is TDBMemo then TDBMemo(ActiveControl).PasteFromClipboard; If ActiveControl is TEdit then TEdit(ActiveControl).PasteFromClipboard; If ActiveControl is TDBedit then TDBedit(ActiveControl).PasteFromClipboard; end;

[000040]



Содержание раздела