一个意想不到的问题,SpeedButton关闭不了模态对话框
我在frm上面放了一个SpeedButton1,然后在SpeedButton的OnClick事件里面添加如下代码
void __fastcall Tfrm::SpeedButton1Click(TObject *Sender)
{
frm->Close();
}
然后在主窗体里面创建了这个frm;
Tfrm *tmpfrm=new Tfrm(this);
tmpfrm->ShowModal();
delete tmpfrm;
frm创建了后我点SpeedButton1却关闭不了他,怎么办啊?SpeedButton没有ModalResult属性