W wjs Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-23 #3 t: TForm; 创建窗体 t := TformA.Create(self); t.visible := true; TformA : 要创建的窗体类。 释放窗体 t.Free 你是要这样吗?
M mdc Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-23 #4 frmmain:Tfrmmain; if assigend(frmmain) then frmmain.showmodal; 释放:frmmain:=nil;
宁 宁柯 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-23 #5 var Form: TForm; begin Form := TForm.Create(Self); Form.ShowModal; {... 关于窗体的其他处理...} Form.Free; Form := nil; end;
var Form: TForm; begin Form := TForm.Create(Self); Form.ShowModal; {... 关于窗体的其他处理...} Form.Free; Form := nil; end;
J jsxjd Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-23 #6 上面是模态的处理, 非模态: TFormA.Create(Self).show;
S SupermanTm Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-23 #7 还是应该用 Application.CreateForm(TFromA, MyForm);
无 无疯无禄 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-23 #8 Application.CreateForm(TMyFrom, MyForm); MyForm.Free;
卡 卡色 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-23 #9 var Form: TForm; begin if assigend(frmmain) then begin Application.CreateForm(TFrom, Form); end; Form.ShowModal; {... 关于窗体的其他处理...} Form.Free; Form := nil; end;
var Form: TForm; begin if assigend(frmmain) then begin Application.CreateForm(TFrom, Form); end; Form.ShowModal; {... 关于窗体的其他处理...} Form.Free; Form := nil; end;