03.04.2007, 10:49
общий
это ответ
Здравствуйте, SashaFAN!
В приложении написан весь код программы
Приложение:
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls, Mask;type TForm1 = class(TForm) Edit1: TEdit; UpDown1: TUpDown; CheckBox1: TCheckBox; CheckBox2: TCheckBox; CheckBox3: TCheckBox; Button1: TButton; MaskEdit1: TMaskEdit; procedure UpDown1Click(Sender: TObject; Button: TUDBtnType); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1; i: integer;implementation{$R *.dfm}procedure TForm1.UpDown1Click(Sender: TObject; Button: TUDBtnType);begini:=Updown1.Position;Edit1.Text:=IntTOstr(i);end;procedure TForm1.Button1Click(Sender: TObject);consten=‘qwertyuiopasdfghjklzxcvbnm‘;zifri=‘1234567890‘;ru=‘йцукеёнгшщзхъфывапролджэячсмитьбю‘;vari,h, w : Integer;S,e: String;beginif (CheckBox1.Checked=false)and (CheckBox2.Checked=false)and (CheckBox3.Checked=false) then exit;if Edit1.Text=‘‘ thenexit;if CheckBox1.Checked= true thene:=e+ zifri;if CheckBox2.Checked=true thene:=e+ru;if CheckBox3.Checked=true thene:=e+ en;h:=length(e);i:=StrToInt(Edit1.Text);w:=0;for w :=0 to i-1 dos:=s+(e[random(h)+1]);if s=‘‘ thenexit;MaskEdit1.Text:=s;end;end.