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

📄 bfhyut.pas

📁 本程序主要功能是进行进销存管理系统的开发源码,主要是使用DElphi为开发环境.用户名和密码为admin
💻 PAS
字号:
unit bfhyut;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls, ComCtrls, ExtCtrls,shellapi;

type
  Tsjbffm = class(TForm)
    Panel1: TPanel;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    ProgressBar1: TProgressBar;
    Timer1: TTimer;
    Label1: TLabel;
    procedure SpeedButton1Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  sjbffm: Tsjbffm;

implementation

{$R *.dfm}

procedure Tsjbffm.SpeedButton1Click(Sender: TObject);
var
opstruc:tshfileopstruct;
frombuf,tobuf:array[0..128]of char;
begin
timer1.Enabled:=true;
progressbar1.Position:=0;
fillchar(frombuf,sizeof(frombuf),0);
fillchar(tobuf,sizeof(tobuf),0);
strpcopy(frombuf,pchar('data/kcgl.mdb'));
strpcopy(tobuf,pchar('backup/'));
with opstruc do
begin
wnd:=handle;
wfunc:=fo_copy;
pfrom:=@frombuf;
pto:=@tobuf;
fflags:=fof_noconfirmation or fof_renameoncollision;
fanyoperationsaborted:=false;
hnamemappings:=nil;
lpszprogresstitle:=nil;
end;
if shfileoperation(opstruc)=0 then
begin

end;
end;

procedure Tsjbffm.SpeedButton2Click(Sender: TObject);
var
opstruc:tshfileopstruct;
frombuf,tobuf:array[0..128]of char;
begin
timer1.Enabled:=true;
fillchar(frombuf,sizeof(frombuf),0);
fillchar(tobuf,sizeof(tobuf),0);
strpcopy(frombuf,pchar('backup/kcgl.mdb'));
strpcopy(tobuf,pchar('data/'));
with opstruc do
begin
wnd:=handle;
wfunc:=fo_copy;
pfrom:=@frombuf;
pto:=@tobuf;
fflags:=fof_noconfirmation or fof_renameoncollision;
fanyoperationsaborted:=false;
hnamemappings:=nil;
lpszprogresstitle:=nil;
end;
if shfileoperation(opstruc)=0 then
begin

end;

end;

procedure Tsjbffm.Timer1Timer(Sender: TObject);
begin
progressbar1.Position:=progressbar1.Position+10;
if progressbar1.Position=40 then
begin
timer1.Enabled:=false;
showmessage('操作成功!');
progressbar1.Position:=0;

end;
end;

end.

⌨️ 快捷键说明

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