WinForm中播放声音

using System.Runtime.InteropServices;
[DllImport("winmm.dll")]
        public static extern bool PlaySound(string pszSound, int hmod, int fdwSound);
        public const int SND_FILENAME = 0x00020000;
        public const int SND_ASYNC = 0x0001;
 
PlaySound("login.wav", 0, SND_ASYNC | SND_FILENAME);
posted @ 2015-08-26 16:22  慕王爷  阅读(611)  评论(0编辑  收藏  举报