Автор работы: Пользователь скрыл имя, 20 Ноября 2010 в 12:31, Не определен
Лабораторная работа
begin
form3.Show;
end;
procedure TForm1.N26Click(Sender: TObject);
begin
Form2.show;
end;
procedure TForm1.N27Click(Sender: TObject);
begin
Form3.show;
end;
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
var a:integer;
begin
if Form1.Memo1.Modified=true then
begin
a:=Application.
if a=6 then
N4Click(Sender)
else if a=7 then
halt
else canclose:=false;
end
end;
end.
unit
Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask;
type
TForm2 = class(TForm)
MaskEdit1: TMaskEdit;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
MaskEdit2: TMaskEdit;
Label2: TLabel;
Button3: TButton;
Button4: TButton;
MaskEdit3: TMaskEdit;
Label3: TLabel;
Button5: TButton;
Button6: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses
Unit1;
{$R
*.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
Form1.Memo1.Seltext:=
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
Form1.Memo1.Lines.Add(
end;
procedure TForm2.Button3Click(Sender: TObject);
begin
Form1.Memo1.Seltext:=
end;
procedure TForm2.Button5Click(Sender: TObject);
begin
Form1.Memo1.Seltext:=
end;
procedure TForm2.Button4Click(Sender: TObject);
begin
Form1.Memo1.Lines.Add(
end;
procedure TForm2.Button6Click(Sender: TObject);
begin
Form1.Memo1.Lines.Add(
end;
end.
unit
Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ExtCtrls;
type
TForm3 = class(TForm)
Label1: TLabel;
Label2: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses
Unit1, Unit2;
{$R
*.dfm}
end.