P
pacificsand
Unregistered / Unconfirmed
GUEST, unregistred user!
我用MDI编程。在MAINFORM上加个菜单,希望从菜单驱动,显示子窗口。
在菜单上选一项单击,在ONCLICK事件中编程:
VAR
SHOWCHILDFORM:TSHOWCHILDFORM;
BEGIN
SHOWCHILDFORM:=TSHOWCHILDFORM。CREATE(APPLICATION);
//或application.CreateForm(tfrmyhkl,frmyhkl)也不行
SHOWCHILDFORM。SHOWMODAL;
END;
能显示子窗口,但接着就有个提示框:
RAISED EXCEPTION CLASS EINVALIDOPERATION WITH MESSAGE’CAN NOT MAKE A
VISIBLE WINDOW MODAL!‘。
在菜单上选一项单击,在ONCLICK事件中编程:
VAR
SHOWCHILDFORM:TSHOWCHILDFORM;
BEGIN
SHOWCHILDFORM:=TSHOWCHILDFORM。CREATE(APPLICATION);
//或application.CreateForm(tfrmyhkl,frmyhkl)也不行
SHOWCHILDFORM。SHOWMODAL;
END;
能显示子窗口,但接着就有个提示框:
RAISED EXCEPTION CLASS EINVALIDOPERATION WITH MESSAGE’CAN NOT MAKE A
VISIBLE WINDOW MODAL!‘。