areginf.pas

来自「delphi编程控件」· PAS 代码 · 共 45 行

PAS
45
字号
unit areginf;
(*
 COPYRIGHT (c) RSD Software 1997 - 98
 All Rights Reserved.
*)

interface
uses forms, Registry;

procedure StoreAutoFormsInformtion(AForm : TForm);
procedure ReStoreAutoFormsInformtion(AForm : TForm);

implementation
uses aclconst;

procedure StoreAutoFormsInformtion(AForm : TForm);
Var
  reg : TRegIniFile;
begin
  reg := TRegIniFile.Create(REGISTRYRSDPATHTOACL);
  with reg, AForm do begin
    LazyWrite := True;
    WriteInteger(AForm.Name, 'Top', Top);
    WriteInteger(AForm.Name, 'Left', Left);
    WriteInteger(AForm.Name, 'Height', Height);
    WriteInteger(AForm.Name, 'Width', Width);
  end;  
end;

procedure ReStoreAutoFormsInformtion(AForm : TForm);
Var
  reg : TRegIniFile;
begin
  reg := TRegIniFile.Create(REGISTRYRSDPATHTOACL);
  with reg, AForm do begin
    Top := reg.ReadInteger(AForm.Name, 'Top', Top);
    Left := reg.ReadInteger(AForm.Name, 'Left', Left);
    Height := reg.ReadInteger(AForm.Name, 'Height', Height);
    Width :=  reg.ReadInteger(AForm.Name, 'Width', Width);
  end;
end;


end.

⌨️ 快捷键说明

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