码迷,mamicode.com
首页 > Windows程序 > 详细

C#time 闹钟

时间:2015-05-26 21:12:08      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:

     private void timer2_Tick(object sender, EventArgs e)
        {
            lbltime.Text = DateTime.Now.ToString();
            if (DateTime.Now.Hour == 19 && DateTime.Now.Minute == 41 && DateTime.Now.Second == 50)
            {
                SoundPlayer sp = new SoundPlayer();
                sp.SoundLocation = @"D:/c/hh.wav";
                sp.Play();
            }
        }

 

C#time 闹钟

标签:

原文地址:http://www.cnblogs.com/zywf/p/4531570.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!