modeunit.pas

来自「人事管理系统 人事管理系统」· PAS 代码 · 共 53 行

PAS
53
字号
unit ModeUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids;

type
  TModeForm = class(TForm)
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
    procedure WMGETMINMAXINFO(var msg:TWMGetMinMaxInfo);
              message WM_GETMINMAXINFO;
  public
    { Public declarations }
  end;

var
  ModeForm: TModeForm;

implementation

uses
  mainunit, barunit;
{$R *.dfm}

procedure Tmodeform.WMGETMINMAXINFO(var msg:TWMGetMinMaxInfo);
var
  r : Trect;
begin
  systemparametersinfo(SPI_GETWORKAREA,0,@R,0);
  with msg.MinMaxInfo^ do
  begin
    PtmaxSize.X := r.Right;          {最大化时的宽度}
    PtMaxSize.Y := r.Bottom - maxheight;                 {最大化时的高度}
    PtMaxposition.x := r.Left;      {最大化时左上角的横坐标}
    PtMaxPosition.Y := mainform.BoundsRect.Bottom;  {最大化时左上角的纵坐标}
  end;    // with
  msg.Result := 0;                      {返回消息}
  inherited;
end;


procedure TModeForm.FormShow(Sender: TObject);
begin
  top := mainform.BoundsRect.Bottom + 10;
  left := barform.BoundsRect.Right + 10;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?