L lqxj Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-03 #1 每次执行application.CreateForm就会创建一个相同的子窗口 我想如果该窗口已经存在,就不再创建了,该怎么办呢?分不多了
J jianguobu Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-03 #2 如这样 if not Assigned(RecExeForm) then begin RecExeForm:=TRecExeForm.Create(Self); RecExeForm.Show; end else RecExeForm.BringToFront;
如这样 if not Assigned(RecExeForm) then begin RecExeForm:=TRecExeForm.Create(Self); RecExeForm.Show; end else RecExeForm.BringToFront;
O oupj Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-03 #3 if not assigned(formname) then begin Application.CreateForm(Tformname, formname); try formname.show; finally formname.freeonrelease; end; end else formname.bringtofromt;
if not assigned(formname) then begin Application.CreateForm(Tformname, formname); try formname.show; finally formname.freeonrelease; end; end else formname.bringtofromt;
J jianguobu Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-03 #5 晕,是你的代码有问题呀 在form的close事件里写上 action :=cafree; 在Destroy事件里写上 你的form:= nil
L lqxj Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-03 #6 诚然如胸台所料 吾之form虽free之,然未等于nil,终成小祸