我在窗体上建两个按钮,caption 属性分别为‘确定’,‘取消’
name 属性为 bt_ok,bt_cancel
两上edit 组件 name分别为 edi_username,edi_userpass
procedure TForm1.bt_cancelclick(sender:Tobject);
begin
  form1.modalresult:=mrcancel;
  form1.close;
  application.terminate;
end;
procedure TForm1.bt_okclick(sender:TObject);
begin
  if(edi_username.text='ybb') and(edi_userpass.text='544')then
   begin
    form1.hide;
    form1.modalresult:=mrok;
  end;
end;
请问一下按钮控件有modalresult属性,为什么把这个属性给了窗体也一样能运行。