示例:
procedure StrToClipbrd(StrValue: string);
var
A: array[0..255] of char;
begin
StrPCopy(A, StrValue);
Clipboard.SetTextBuf(A);
end;
function GetStrFromClipbrd : string;
begin
if Clipboard.HasFormat(CF_TEXT) then
result := Clipboard.AsText
else
begin
ShowMessage('There is no text in the Clipboard!');
result := '';
end;
end;
本文介绍了一种使用Delphi进行剪贴板读写的方法。包括将字符串放入剪贴板和从剪贴板获取字符串的两个过程。这些过程通过Delphi内置的Clipboard对象实现。
5002

被折叠的 条评论
为什么被折叠?



