unit Unit2;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, StdCtrls, ExtCtrls;type
  TForm2 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Label3: TLabel;
    RadioGroup1: TRadioGroup;
    Edit3: TEdit;
    Button1: TButton;
    Button2: TButton;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioButton3: TRadioButton;
    procedure FormClick(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form2: TForm2;implementation{$R *.dfm}
 uses unit3;
procedure TForm2.FormClick(Sender: TObject);
begin
edit1.Visible :=True;
end;procedure TForm2.Button2Click(Sender: TObject);
begin
Close ;
end;procedure TForm2.Button1Click(Sender: TObject);
var  TinfoDlg:TTinfoDlg;
  j:integer;
  tint:integer;
begin if length(edit1.Text )=0 then
 MessageDlg('姓名不能为空!',mtError,[mbok],0)
 //else if  ??? then  //定义Edit1.text只能为字符
 //MessageDlg('姓名不能为数字!',mtError,[mbok],0)
 else
  begin
 if length(edit2.Text )=0 then
 MessageDlg('年龄不能为空!',mtError,[mbok],0) //定义Edit1.text只能为数字
 else
 begin
 if length(edit3.Text )=0 then
 MessageDlg('工作不能为空!',mtError,[mbok],0)
 else
 begin
  TinfoDlg:=TTinfoDlg.Create(Application);
     begin
       if RadioButton1.Checked  then
      TinfoDlg.Memo1.Lines.Text :=edit1.Text +'你的年龄是'+edit2.Text
      +'工作是'+edit3.Text +'性别是'+(radiobutton1.Caption )
      else if RadioButton2.Checked  then
      TinfoDlg.Memo1.Lines.Text :=edit1.Text +'你的年龄是'+edit2.Text
      +'工作是'+edit3.Text +'性别是'+(radiobutton2.Caption )
       else
      TinfoDlg.Memo1.Lines.Text :=edit1.Text +'你的年龄是'+edit2.Text
      +'工作是'+edit3.Text +'性别是'+(radiobutton3.Caption )
      end;
     TinfoDlg.ShowModal;
     end;
  end;
  end;
end;end.