标题: 用timer控件做的小闹钟 [打印本页] 作者: wuyf 时间: 2013-7-23 11:26 标题: 用timer控件做的小闹钟 用timer控件做的小闹钟 ,用的都是基础语法。作者: 站长苏飞 时间: 2013-7-23 11:35
[code=csharp]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.Data;
namespace alarm_clock
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Class1 c = new Class1();
label1.Text =DateTime.Now.ToShortTimeString() ;
if (label1.Text == textBox1.Text)
{
c.alarmclock();
timer1.Enabled = false;
}