soundplayer.cs

来自「实现微软OFFICEACCESE数据库自动备份功能」· CS 代码 · 共 22 行

CS
22
字号
using System;
using System.Runtime.InteropServices;

namespace gowk.multimedia
{
	/// <summary>
	/// SoundPlayer 的摘要说明。
	/// </summary>
	public class SoundPlayer
	{
		[DllImport("Winmm.dll")]
		static extern bool  sndPlaySound(string wfname, int fuSound);
		public SoundPlayer()
		{
		}
		public void Play(string file)
		{
			bool b=sndPlaySound(file,1);
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?