edit1的onkeypress中if key=#13 then
  bitbtn4.click;

解决方案 »

  1.   

    你可以这样实现:procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
    begin
      if key=#13 then  //判断是否是回车键
      begin
        key:=#0;       //取消蜂鸣
        BitBtn4Click(sender); //执行BitBtn4Click过程
      end;
    end;procedure TForm1.BitBtn4Click(Sender: TObject);
    begin
      //Do something you want
    end;-------------------------------------------------------------------
    风过西窗客渡舟船无觅处
    年年一川新草遥看却似旧
      

  2.   

    来晚了,总结一下:
    在Edit的KeyPress事件中写:
    If Key=#13 then
       BitBtn4.Click;
    或者
      Bitbtn4Click(Sender);
      

  3.   

    来晚了,总结一下:
    在Edit的KeyPress事件中写:
    If Key=#13 then
       BitBtn4.Click;
    或者
      Bitbtn4Click(Sender);
      

  4.   

    来晚了,总结一下:
    在Edit的KeyPress事件中写:
    If Key=#13 then
       BitBtn4.Click;
    或者
      Bitbtn4Click(Sender);