i:=0 to MDIChildCount-1 do
For j:=0 to ChildFormNum-1 do
If MDIChildRen[i] is TMonthForm then
begin
FindOne:=True;
MonthForm.Show;
Break;
end;
If not FindOne then
MonthForm:=TMonthForm.Create(self);
end;
procedure TMainForm.N9Click(Sender: TObject);
var
i,j:integer;
FindOne:Boolean;
begin
FindOne:=false;
For i:=0 to MDIChildCount-1 do
For j:=0 to ChildFormNum-1 do
If MDIChildRen[i] is TYEARForm then
begin
FindOne:=True;
YEARForm.Show;
Break;
end;
If not FindOne then
YEARForm:=TYEARForm.Create(self);
end;
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if Application.MessageBox('是否退出畅海货运管理系统?','系统提示',MB_YesNO)=mrNO then
Abort;
end;