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
标签:窗口,Reference,delphi,Height,Width,和子,TForm,Top 来源: https://www.cnblogs.com/jijm123/p/15254374.html