{$R *.dfm}
function TMainfrm.ExistsForm(MDIFormCaption:String):boolean;
var
i:byte;
begin
result:=true;
for i:=0 to MDIChildCount-1 do
begin
if MDIChildren[i].Caption=MDIFormCaption
then
result:=false;
end;
end;
procedure TMainFrm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
application.Terminate;
end;
procedure TMainFrm.Timer1Timer(Sender: TObject);
begin
statusbar1.Panels[1].Text:='当前用户:'+name;
StatusBar1.Panels[2].Text:=application.hint;
statusbar1.Panels[3].Text:='现在日期:'+datetostr(date);
statusbar1.Panels[4].Text:='时间:'+timetostr(time);
end;
procedure TMainFrm.N8Click(Sender: TObject);
begin
if ExistsForm('考员管理') then
begin
Application.CreateForm(Tstudentfrm, studentfrm);
studentfrm.show;
end
else
studentfrm.Show;
studentfrm.pagecontrol1.Align: