——此文章摘自《Delphi開發經驗技巧寶典》定價
¥
特價
¥
購買>>
http://track
linktech
cn/?m_id=dangdang&a_id=A
&l=
&l_type
=
width=
height=
border=
nosave>
單擊復制按鈕調用文本框的CopyToClipboard(復制)方法復制文本框中的數據主要代碼如下
procedure TFrmOrderByBtnOrderClick(Sender: TObject);
begin
dbedtSetFocus;
dbedtSelectAll;
dbedtCopyToClipboard;
dbedtSelStart := length(dbedtText);
end;
單擊粘貼按鈕中調用文本框的PasteFromClipboard(粘貼)方法把數據粘貼到選擇的表格單元中主要代碼如下
procedure TFrmOrderByButtonClick(Sender: TObject);
begin
dbedtSetFocus;
dbedtSelectAll;
dbedtPasteFromClipboard;
DBGListSelectedFieldAsString := dbedtText;
end;
right>[http://developcsaicn/delphi/htm>] []
From:http://tw.wingwit.com/Article/program/Delphi/201311/8522.html