同时响应一个事件

功能说明:同时响应一个事件 


procedure TForm1.Button1Click(Sender: TObject);
begin
    IfTbutton(sender).Name='Button1'then showmessage('你单击了Button1');
    IfTbutton(sender).Name='Button2'then showmessage('你单击了Button2');
    IfTbutton(sender).Name='Button3'then showmessage('你单击了Button3');
end;




posted @ 2012-05-26 08:14  XE2011  阅读(81)  评论(0编辑  收藏  举报