unitcvtprogress.pas
来自「自动语音应答系统」· PAS 代码 · 共 81 行
PAS
81 行
unit UnitCvtProgress;
{$IFDEF WIN32}
{$H+}
{$ENDIF}
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, ExtCtrls, MMWaveIO, MMObj, MMGauge;
type
TFormCvtProgress = class(TForm)
Label1: TLabel;
Label2: TLabel;
LblFrom: TLabel;
LblTo: TLabel;
Button1: TButton;
Gauge1: TMMGauge;
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
public
Cancel: Boolean;
end;
var
FormCvtProgress: TFormCvtProgress;
implementation
{$R *.DFM}
uses UnitFmtDialog, UnitMain;
{-- TCvtProgress ---------------------------------------------------------}
procedure TFormCvtProgress.FormShow(Sender: TObject);
var
FormatTag, Format: String;
begin
Cancel := False;
with FormMain do
begin
if not MMACM1.ACMPresent then
begin
wioGetFormatName(MMWaveFile1.Wave.PWaveFormat, FormatTag);
wioGetFormat(MMWaveFile1.Wave.PWaveFormat, Format);
end
else MMACM1.GetFormatDescription(MMWaveFile1.Wave.PWaveFormat, FormatTag, Format);
LblFrom.Caption := FormatTag +' '+ Format;
if not MMACM1.ACMPresent then
begin
wioGetFormatName(FmtDialog.PWaveFormat, FormatTag);
wioGetFormat(FmtDialog.PWaveFormat, Format);
end
else MMACM1.GetFormatDescription(MMACM1.PWaveFormat, FormatTag, Format);
LblTo.Caption := FormatTag +' '+ Format;
end;
end;
{-- TCvtProgress ---------------------------------------------------------}
procedure TFormCvtProgress.Button1Click(Sender: TObject);
begin
Cancel := True;
end;
{-- TCvtProgress ---------------------------------------------------------}
procedure TFormCvtProgress.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Cancel := True;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?