首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

怎么用mciSendString API加背景音乐

2013-07-08 
如何用mciSendString API加背景音乐求例子,百度查了一下都看不懂~~~uses MMSystemprocedure TForm1.btn1C

如何用mciSendString API加背景音乐
求例子,百度查了一下都看不懂~~~


uses MMSystem;

procedure TForm1.btn1Click(Sender: TObject);
var
  fName: string;
begin
  fName := 'c:\the_moment';
  begin
    ;
    MCISendString(PChar(Format('OPEN %s TYPE mpegvideo alias ww', [fName])),
      nil, 0, 0);
    MCISendString('PLAY WW', nil, 0, 0);
    MCISendString('CLOSE ANIMATION', '', 0, 0);
  end;
end;


只要注意音乐文件名不要带空格,空格可以用 _ 下划线代替

热点排行