本文整理自网络,侵删。
//播放.MP3文件: uses mmsystem; //?_始播放: procedure TForm1.Button1Click(Sender: TObject); beginMCISendString('OPEN e:\1.mp3 TYPE mpegvideo alias ww',nil, 0, 0); MCISendString('PLAY WW', nil, 0, 0); MCISendString('CLOSE ANIMATION', nil, 0, 0); end; //停止播放 procedure TForm1.Button2Click(Sender: TObject); beginMCISendString('OPEN e:\1.mp3 TYPE mpegvideo alias ww', nil, 0, 0); MCISendString('STOP ww', nil, 0, 0); MCISendString('CLOSE ANIMATION', nil, 0, 0); end;
相关阅读 >>
更多相关阅读请进入《Delphi》频道 >>