本文整理自网络,侵删。
function RandString(s: string; Min, Max: Integer): string;var count, i, r : Integer;begin Result := ''; if ((Max - Min) > 0) then begin count := Random(Max - Min + 1) + Min; for i := 0 to count - 1 do begin r := Random(Length(s)) + 1; Result := Result + s[r]; end; end;end;
procedure TForm1.Button1Click(Sender: TObject);beginshowmessage(RandString('ABCDEFGHIJKLMN',9,10));end;
相关阅读 >>
Delphi代码,直截注入别的进程,之后直截运行在别的进程中的代码!
在xp/2k 下实现 win+ctrl+del 等键的屏蔽的方法
更多相关阅读请进入《Delphi》频道 >>