delphi -----(去掉窗口最大化,最小化、关闭),主窗口,和子窗口之间的设置
一、去掉窗口最大化,最小化、关闭
borderIcons:biSystemMenu:false
borderStyle:bsSizeable
二、主子窗口
主main:
//调用子窗体
procedure TFrmMain.CallChildForm(FormChild: TFormClass; var Reference);
var
i: Integer;
begin
if MDIChildCount >0 then
for i := 0 to MDIChildCount-1 do
if MDIChildren[i]=TForm(Reference) then
begin
TForm(Reference).WindowState := wsNormal;
TForm(Reference).BringToFront;
Exit;
end;
Application.CreateForm(FormChild, Reference);
end;
大小设置
Left := 0;
Top := 0;
Width := Screen.Width;
Height := Screen.Height - 31;
gChildHeight := Height - SBar_Status.Height - 90;
gChildWidth := Width -26;
属性:Windowstate:wsMaximized
FormStyle: fsMDIForm
子窗口
主调子
CallChildForm(TFrmBaseModel,FrmBaseModel);
大小
Top := 50;
Left := 0;
Width:=gChildWidth;
height:=gChildHeight;
属性:FormStyle:fsMDIChild