码迷,mamicode.com
首页 > 其他好文 > 详细

组建的应用

时间:2014-07-22 23:16:12      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   color   os   io   

1.组件的应用

  组件, 添加但不可直接显示在窗体上的控件

  1.1 Timer闹钟

  放一个Label和一个Timer

  bubuko.com,布布扣  

 1 private void Form1_Load(object sender, EventArgs e)
 2         {
 3             this.timer1.Interval = 500; //单位ms
 4             this.timer1.Start();
 5             label1.Text = DateTime.Now.ToString();
 6         }
 7 
 8         private void timer1_Tick(object sender, EventArgs e)
 9         {
10             DateTime time = DateTime.Now;
11             this.label1.Text = time.ToString();
12             if (time.Hour == 8 && time.Minute == 1 && time.Second == 1)
13                 MessageBox.Show("起床啦!!");
14         }

 

  1.2 ImageList 组件

  

  

组建的应用,布布扣,bubuko.com

组建的应用

标签:des   style   blog   color   os   io   

原文地址:http://www.cnblogs.com/iMirror/p/3861330.html

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