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

📄 quit_unit.~pa

📁 网上搜索来的进销存源码
💻 ~PA
字号:
unit Quit_Unit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ExtCtrls,IdGlobal;

type
  TQuit_Form = class(TForm)
    ProgressBar1: TProgressBar;
    Timer1: TTimer;
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }

  public
    { Public declarations }
    procedure BackupDataBase;
  end;

var
  Quit_Form: TQuit_Form;

implementation

uses main_unit;

{$R *.dfm}




procedure TQuit_Form.BackupDataBase;
var
  BackUpFile : string;
  TmpStr : string;
  DestPath : string;
begin
  BackUpFile :='backup.bak';
  DestPath :='backup\';
  TmpStr := ExtractFilePath(Application.ExeName);
  if  not DirectoryExists(TmpStr+DestPath) then
  begin
    try
      CreateDir(TmpStr+DestPath);
    except
    end;
  end;
  if FileExists(TmpStr+DestPath+BackUpFile) then
  begin
    try
      DeleteFile(TmpStr+DestPath+BackUpFile);
    except
    end;  
  end;
   CopyFileTo(TmpStr+'mdb\'+'jxc.mdb',TmpStr+DestPath+BackUpFile);    
end;

procedure TQuit_Form.Timer1Timer(Sender: TObject);
begin
  if ProgressBar1.Position >=60 then
  begin
    Application.Terminate;
  end;
  ProgressBar1.Position := ProgressBar1.Position +1;
end;

end.

⌨️ 快捷键说明

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