- procedure TForm1.Button1Click(Sender: TObject);
- begin
- //播放音乐
- MCISendString(OPEN e: \\1.MID type SEQUENCER ALIAS NN, , 0, 0);
- MCISendString(PLAY NN FROM 0, , 0, 0);
- MCISendString(CLOSE ANIMATION, , 0, 0);
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- //停止播放
- MCISendString(OPEN e: \\1.MID type SEQUENCER ALIAS NN, , 0, 0);
- MCISendString(STOP NN, , 0, 0);
- MCISendString(CLOSE ANIMATION, , 0, 0);
- end;
- //该片段来自于http://www.codesnippet.cn/detail/16112012411.html
来源: http://www.codesnippet.cn/detail/16112012411.html