P
pluszt
Unregistered / Unconfirmed
GUEST, unregistred user!
代码:
moform;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Buttons, StdCtrls, ExtCtrls, Mask;
type
TForm1 = class(TForm)
Shape1: TShape;
Button1: TButton;
Button2: TButton;
Button3: TButton;
BitBtn1: TBitBtn;
ColorDialog1: TColorDialog;
Panel1: TPanel;
Button4: TButton;
Button5: TButton;
Panel2: TPanel;
Button6: TButton;
Button7: TButton;
BitBtn2: TBitBtn;
Panel3: TPanel;
Button8: TButton;
Button9: TButton;
Edit1: TEdit;
Button10: TButton;
Edit2: TEdit;
Button11: TButton;
Button12: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure Button12Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
shape1.Shape:=stRectangle;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
shape1.Shape:=stCircle;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
shape1.Shape:=stEllipse;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
colordialog1.Execute;
shape1.Brush.Color:=colordialog1.Color;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
shape1.Width:=shape1.Width+10;
shape1.Left:=shape1.Left-5;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
shape1.Width:=shape1.Width-10;
shape1.Left:=shape1.Left+5;
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
shape1.Height:=shape1.Height+10;
shape1.Top:=shape1.Top-5;
end;
procedure TForm1.Button7Click(Sender: TObject);
begin
shape1.Height:=shape1.Height-10;
shape1.Top:=shape1.Top+5;
end;
procedure TForm1.Button8Click(Sender: TObject);
begin
shape1.Width:=shape1.Width+10;
shape1.Left:=shape1.Left-5;
shape1.Height:=shape1.Height+10;
shape1.Top:=shape1.Top-5;
end;
procedure TForm1.Button9Click(Sender: TObject);
begin
shape1.Width:=shape1.Width-10;
shape1.Left:=shape1.Left+5;
shape1.Height:=shape1.Height-10;
shape1.Top:=shape1.Top+5;
end;
procedure TForm1.Button10Click(Sender: TObject);
begin
edit1.Text:=inttostr(shape1.width);
form1.button11click(sender);
end;
procedure TForm1.Button11Click(Sender: TObject);
begin
edit2.Text:=inttostr(shape1.height);
//form1.Button10click(sender);
end;
procedure TForm1.Button12Click(Sender: TObject);
begin
shape1.Width:=shape1.Height;
end;
end.
中的procedure TForm1.Button10Click(Sender: TObject);
begin
edit1.Text:=inttostr(shape1.width);
form1.button11click(sender);
end;
procedure TForm1.Button11Click(Sender: TObject);
begin
edit2.Text:=inttostr(shape1.height);
//form1.Button10click(sender);
end;
这两个过程为什么不能相互调用呢?