本文整理自网络,侵删。
function RollStr(str: string; count: Integer = 1): string;
var
i, k, len: Integer;
begin
len := length(str);
for k := 0 to Count - 1 do
begin
if ord(str[1]) > 127 then
str := copy(str, 3, MAXINT) + copy(str, 1, 2)
else
str := copy(str, 2, MAXINT) + copy(str, 1, 1);
end;
Result := str;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
caption := RollStr(caption);
end;
相关阅读 >>
Delphi net.httpclient用最精简的代码获取网页数据
Delphi windows 编程[18] - 更换菜单项: modifymenu
Delphi - 如何执行windows、osx、linux的外部程序?
更多相关阅读请进入《Delphi》频道 >>