var name:string;
f:textfile;
begin
if savedialog1.Execute then name:=savedialog1.FileName;
if name='' then showmessage('Не выбран файл для сохранения') else
begin
assignfile(f,name);rewrite(f);
for p:=1 to q do writeln(f,s[p]);
closefile(f);
end;
end;
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
form1.Show;
end;
// Возрашение к началу сортировки
procedure TForm2.Button3Click(Sender: TObject);
begin
application.Createform(tform1, form1);
form1.visible:=true;
Form2.Hide;
end;
procedure TForm2.Timer1Timer(Sender: TObject);
begin
statusBar1.Panels[0].Text:=DateToStr(Now);
StatusBar1.Panels[1].Text:=TimeToStr(Now);
StatusBar1.Panels[0].Alignment:=taCenterend;
procedure TForm2.N4Click(Sender: TObject);
begin
Button1.Click;
end;
procedure TForm2.N5Click(Sender: TObject);
begin
Button2.Click;
end;
procedure TForm2.N7Click(Sender: TObject);
begin
Button3.Click;
end;
procedure TForm2.N9Click(Sender: TObject);
begin
Close;
end;
procedure TForm2.N2Click(Sender: TObject);begin
Form3.Visible:=True;
end;
end.
Текст модуля о “программе”:
implementation
{$R *.dfm}
procedure TForm3.BitBtn1Click(Sender: TObject);
begin
Close;
end;
end.