MP3媒体播放器非常有趣,在C#中很容易开发。
注意:此媒体播放器仅接受(.wav)格式。
使用C#开发MP3播放器示例
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Media; namespace WindowsFormsApplication18 { public partial class Form1 : Form { private SoundPlayer _soundplaer; public Form1() { InitializeComponent(); _soundplaer = new SoundPlayer("突然的自我.wav"); } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { _soundplaer.Play(); } } }
日期:2020-04-11 23:03:45 来源:oir作者:oir