A a_ping Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-10 #1 我用一个窗体做登陆窗体,属性为fsnormal,当输入正确后,弹出程序主窗体,是fsMDIFROM,但再开fsMDIChild窗体,就抱错,如果窗体都为fsnormal就没错,是怎么回事啊
Q qaz2003 Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-10 #2 //假设:Form1为MDI主窗体,Form2为登录窗体 procedure TForm1.FormCreate(Sender: TObject); begin InitAll; end; procedure TForm1.InitAll; begin Form2 := TForm2.Create(Application); Form2.ShowModal; if Form2.ModalResult = mrCancel then Application.terminate; end;
//假设:Form1为MDI主窗体,Form2为登录窗体 procedure TForm1.FormCreate(Sender: TObject); begin InitAll; end; procedure TForm1.InitAll; begin Form2 := TForm2.Create(Application); Form2.ShowModal; if Form2.ModalResult = mrCancel then Application.terminate; end;
D dez_0609 Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-11 #3 在主窗体中,想打开一个MDIChildform(前提是该窗体的formstyle属性为fsmdichild),可以在菜单的onclick中: application.createform(TF_child1,F_child1);//主窗体中要uses该子窗体
在主窗体中,想打开一个MDIChildform(前提是该窗体的formstyle属性为fsmdichild),可以在菜单的onclick中: application.createform(TF_child1,F_child1);//主窗体中要uses该子窗体
C Clearboy Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-12 #5 不可以为showmodal模式对话框啊,MDI的意思知道嘛,你用的showmodal有矛盾啊!
E Elite_liu Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-12 #7 想打开一个MDIChildform(前提是该窗体的formstyle属性为fsmdichild),楼上说得对,不能用showmodal打开,用show打开就可以啦,然后在子窗体的onclose事件中加上如下代码: action:=cafree;
想打开一个MDIChildform(前提是该窗体的formstyle属性为fsmdichild),楼上说得对,不能用showmodal打开,用show打开就可以啦,然后在子窗体的onclose事件中加上如下代码: action:=cafree;
鹰 鹰之子 Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-12 #8 把登陆窗体放到工程的source中去,不要把登陆窗体设为fsMDIChild
F flute Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-14 #9 可以把登陆窗体放在工程的原程序中:如: Application.CreateForm(Tmain, main); Application.CreateForm(Talter_rep, alter_rep); login:=tlogin.create(application); if login.showmodal=mrok then begin Application.Run; end;
可以把登陆窗体放在工程的原程序中:如: Application.CreateForm(Tmain, main); Application.CreateForm(Talter_rep, alter_rep); login:=tlogin.create(application); if login.showmodal=mrok then begin Application.Run; end;