不使用任何控件的录音程序

时间:2010-02-27 18:00:28  来源:第二电脑网  作者:第二电脑网

  第二电脑网导读:: TButton;Button4: TButton;SaveDialog1: TSaveDialog;procedure Button1Click(Sender: TObject);procedure Button2Click(Sender: TObject);procedure Button3Click(Sender: TObject);procedure Button4Click(Sender: TObject);private{ Private declarations }public{ Public declarations }end;var
  正文:unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,mmsystem, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button4: TButton;
SaveDialog1: TSaveDialog;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  mciSendString('close p1',0,0,0);
  mciSendStringA('open new type WAVEAudio alias p1',0,0,0);
  mciSendString('record p1',0,0,0);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  mciSendString('stop p1',0,0,0);
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  mciSendString('play p1',0,0,0);
end;

procedure TForm1.Button4Click(Sender: TObject);
var s:string;
begin
  if SaveDialog1.Execute then
    s:='save p1 '+SaveDialog1.filename;
  mciSendString(pchar(s),0,0,0);
end;

end. "不使用任何控件的录音程序"由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Language/Delphi/12951.html


关键字:

关于《不使用任何控件的录音程序》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td