Código
var
num,max,i:integer;
Key:Char;
begin
randomize;
max:=5;//quantidade de caracteres na senha
Edit1.Text:='';
for i:=0 to max do
begin
num := Round(random(36)); //Máximo do numero aleatório
case Num of
0: Key := '0';
1: Key := 'A';
2: Key := 'B';
3: Key := 'C';
4: Key := 'D';
5: Key := 'E';
6: Key := 'F';
7: Key := 'G';
8: Key := 'H';
9: Key := 'I';
10: Key := 'J';
11: Key := 'K';
12: Key := 'L';
13: Key := 'M';
14: Key := 'N';
15: Key := 'O';
16: Key := 'P';
17: Key := 'Q';
18: Key := 'R';
19: Key := 'S';
20: Key := 'T';
21: Key := 'U';
22: Key := 'V';
23: Key := 'W';
24: Key := 'X';
25: Key := 'Y';
26: Key := 'Z';
27: Key := '1';
28: Key := '2';
29: Key := '3';
30: Key := '4';
31: Key := '5';
32: Key := '6';
33: Key := '7';
34: Key := '8';
35: Key := '9';
end;
Edit1.Text:=Edit1.Text+Key;
end;
end;
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009