C
chuanxue
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下。当程序运行后,第一次点按钮会弹出“1”消息窗,但不弹出“hello one”消息窗,但以后点时都 只弹出“hello one”而不弹出“1”了。请问是怎么回事?如何才能每次都是先弹出“1”,再弹出“hello one”?
procedure TForm1.Onddclick(Sender:TObject);
begin
showmessage('hello one');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage('1');
button1.OnClick:=onddclick;
end;
procedure TForm1.Onddclick(Sender:TObject);
begin
showmessage('hello one');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage('1');
button1.OnClick:=onddclick;
end;