110,566
社区成员
发帖
与我相关
我的任务
分享
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;
using System.IO;
namespace WindowsFormsApplication9
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
System.Media.SoundPlayer player = new System.Media.SoundPlayer();
protected override void OnClick(EventArgs e)
{
base.OnClick(e);
timer1.Start();
player.SoundLocation = @"d:/bp.mp3";
player.Load();
player.Play();
}
private void timer1_Tick(object sender, EventArgs e)
{
label1.Text = DateTime.Now.ToString("HH点mm分ss秒fff毫秒");
}
}
}