首页 > 其他 > 详细

站立会议的内容(第十一次)

时间:2016-05-22 21:24:57      阅读:208      评论:0      收藏:0      [点我收藏+]

今天的下午和晚上,我们共同完成了对MCIPlay.cs文件的编写和测试。

 1 using System;
 2 using System.Collections.Generic;
 3 using System.Linq;
 4 using System.Text;
 5 using System.Runtime.InteropServices;
 6 
 7 namespace PlayPlane_01
 8 {
 9     class MCIPlay
10     {
11         public static uint SND_ASYNC = 0x0001;
12         public static uint SND_FILENAME = 0x00020000;
13         [DllImport("winmm.dll")]
14         public static extern uint mciSendString(string lpstrCommand,
15         string lpstrReturnString, uint uReturnLength, uint hWndCallback);
16 
17         private string musicPath;
18 
19         public MCIPlay(string musicPath)
20         {
21             this.musicPath = musicPath;
22         }
23 
24         public void Play()
25         {
26             mciSendString(@"close temp_alias", null, 0, 0);
27             mciSendString(@"open "+musicPath+" alias temp_alias", null, 0, 0);
28             mciSendString("play temp_alias ", null, 0, 0);
29         }
30     }
31 }

技术分享

站立会议的内容(第十一次)

原文:http://www.cnblogs.com/BLZ1/p/5517764.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!