⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sjcustomfrm.pas

📁 供水营销打印程序源码
💻 PAS
字号:
unit SJCustomFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, SJChildFrm, ShellApi, PropStorageEh;

type
  TSJCustomForm = class(TSJChildForm)
    PropStorage: TPropStorageEh;
    RegPropManager: TRegPropStorageManEh;
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SJCustomForm: TSJCustomForm;

implementation

uses SJInvPrintGlobal;

{$R *.dfm}

procedure TSJCustomForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
  inherited;
  if GUseDOSEnterKey and (Key = #13) then
    Perform(CM_DIALOGKEY, VK_TAB, 0)
  else if Key = 'VK_F1' then
    begin if FileExists(GsysPath + 'help\' + Caption + '.htm') then
      ShellExecute(Handle, Pchar('Open'), Pchar(GsysPath + 'help\' + Caption + '.htm'),
        nil, nil, SW_SHOWNORMAL);
    end;
end;

procedure TSJCustomForm.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  if PropStorage.Active then
  try
    RegPropManager.Path := Format(GREGUserSetting, [GUserName]) + '\Forms';
    PropStorage.Section := Caption;
    PropStorage.SaveProperties;
  except
    ;
  end;
end;

procedure TSJCustomForm.FormShow(Sender: TObject);
begin
  inherited;
  if PropStorage.Active then
  try
    RegPropManager.Path := Format(GREGUserSetting, [GUserName]) + '\Forms';
    PropStorage.Section        := Caption;
    PropStorage.LoadProperties;
  except
    ;
  end;
end;

end.

⌨️ 快捷键说明

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