首先在程序的uses段中添加MMSYSTEM
procedure TForm
begin
SndPlaySound(
end;
這樣
程序代碼如下
unit Unit
interface
uses
Windows
Dialogs
type
TForm
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form
implementation
{$R *
procedure TForm
begin
SndPlaySound(
end;
end
保存文件
通過調用SndPlaySound函數
From:http://tw.wingwit.com/Article/program/Delphi/201311/24722.html