我在一个KeyPress事件中处理完后,同时想调用另外一个KeyPress要如何写呢 ?

解决方案 »

  1.   

    呵呵,写在里面就行了。比如你在按钮1处理完后处理按钮2就可写:produce  Button1KeyPress……
     begin 
      if 事件1……  then
           Button1KeyPress(sender);    ……事件2
      

  2.   

    可以用sendmessage激发另一个事件
      

  3.   

    同意sixgj(轰炸机) 的说法非常简单
      

  4.   

    小弟是新手,請講解明白一點好嗎 !! 如:procedure TMAINFORM.cboCsnoKeyPress(Sender: TObject; var Key: Char);
    begin
      if key=#13 then
      begin
            noKeyPress(...);     // 括號中如何寫
            cboCsno.SetFocus;
       end;
    end;procedure TMAINFORM.noKeyPress(Sender: TObject; var Key: Char);
          ......
    end;
      

  5.   

    比如你的noKeyPress是but1的KeyPress事件那就是
    noKeyPress(but1,#13);
      

  6.   

    AM_WJ 我用你的那種方法,行不通。你可還有其它方法,多謝!!
      

  7.   

    produce  Button1KeyPress
    begin 
      Button2KeyPress(sender);
    ...........
    end;