📄 unit2.pas
字号:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Button1: TButton;
Button2: TButton;
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm2.FormShow(Sender: TObject);
begin
Label1.Caption :='您的姓名是:'+Form1.Edit1.text;
Label2.Caption :='您购卖的商品是:'+Form1.Edit2.text;
Label3.Caption :='您购买的商品数量是:'+Form1.Edit3.Text ;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
Form2.Close ;
Form1.Close ;
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
Form2.Hide;
Form1.Show;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -