西安科技学院万重老师有源码,自己下栽研究一下,
是
procedure OpenForm(FormClass: TFormClass;
var fm;
AOwner:TComponent);
var
i: integer;
Child:TForm;
begin
for i := 0 to Screen.FormCount -1do
if Screen.Forms.ClassType=FormClass then
begin
Child:=Screen.Forms;
if Child.WindowState=wsMinimized then
ShowWindow(Child.handle,SW_SHOWNORMAL)
else
ShowWindow(Child.handle,SW_SHOWNA);
if (not Child.Visible) then
Child.Visible:=True;
Child.BringToFront;
Child.Setfocus;
TForm(fm):=Child;
exit;
end;
Child:=TForm(FormClass.NewInstance);
TForm(fm):=Child;
Child.Create(AOwner);
end;
建立窗体。
再
procedure Tfrm_Address.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Query1.Close;
table1.Close;
with Mainformdo
begin
// StatusBar.Panels[1].Text:='通讯录已关闭闭';
if MDIChildCount=1 then
StatusBar.Panels[1].Text:='';
end;
Action:=caFree;
end;
以下是万重老师的联系方式:
地址:西安科技学院143信箱
邮编:710054
网址:www.tenew.com 或 http://homepage.2699.com/home0/mantousoft
邮箱:webmaster@tenew.com 或 mantousoft@163.com
OICQ:6036742