首页 新闻 搜索 专区 学院

今天在编写一个Delphi程序,却怎么也编不出来,希望有高手指点一下!

0
[已关闭问题]

功能是在备注框内输出个人信息,

 

 

下面是我编的代码,不知道哪儿错了??请高手给看一下

 

unit Umain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  TForm1 = class(TForm)
    gbaihao: TGroupBox;
    cbdiaoyu: TCheckBox;
    cbdushu: TCheckBox;
    cbxiaqi: TCheckBox;
    cbdaqiu: TCheckBox;
    cbbiancheng: TCheckBox;
    cbpaoniu: TCheckBox;
    mmbeizhu: TMemo;
    edtxingming: TEdit;
    edtshengri: TEdit;
    edtdizhi: TEdit;
    lbxingming: TLabel;
    lbshengri: TLabel;
    lbdizhi: TLabel;
    gbminzhu: TGroupBox;
    rbhanzhu: TRadioButton;
    rbzhuangzhu: TRadioButton;
    rbmengguzhu: TRadioButton;
    rbqitaminzhu: TRadioButton;
    bbqueding: TBitBtn;
    bbquxiao: TBitBtn;
    procedure gbminzhuClick(Sender: TObject);
    procedure gbaihaoClick(Sender: TObject);
    procedure bbquedingClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  a,b,c,d,minzhushuchu:string;
    dy,ds,xq,dq,bc,pn,aihaoshuchu:string;
implementation

{$R *.dfm}

procedure TForm1.gbminzhuClick(Sender: TObject);


begin
 if rbhanzhu.Checked then a:='汉族';
 if rbzhuangzhu.Checked then b:='壮族';
 if rbmengguzhu.Checked then c:='蒙古族';
 if rbqitaminzhu.Checked then d:='其他民族';
   minzhushuchu:='民族:'+a+b+c+d;
end;

procedure TForm1.gbaihaoClick(Sender: TObject);


begin
 if cbdiaoyu.Checked then dy:='钓鱼';
 if cbdushu.Checked then ds:='读书';
 if cbxiaqi.Checked then xq:='下棋';
 if cbdaqiu.Checked then dq:='打球';
 if cbbiancheng.Checked then bc:='编程';
 if cbpaoniu.Checked then pn:='泡妞';
    aihaoshuchu='我的爱好是:'+dy+ds+xq+dq+bc+pn;

end;

procedure TForm1.bbquedingClick(Sender: TObject);
begin
mmbeizhu.Lines.Add(mizhushuchu+aihaoshuchu)
end;

end.

 

 

暂时还没有处理文本框的东西,可是就报错了
山寨IT的主页 山寨IT | 菜鸟二级 | 园豆:205
提问于:2009-10-31 00:10
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册