winform制作的精美时钟
参考了好多资料,终于做了一个winform时钟出来,效果图如下:

1,首先在winfrom项目中添加了一个用户控件ClockControl,实现过程可见代码注释,代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;namespace WinClock
{public partial class ClockControl : UserControl{const int screenWidth = 200; //屏幕宽度const int screenHeight = 200; //屏幕高度public ClockControl(){InitializeComponent();this.Width = screenWidth + 1;this.Height = screenHeight + 1;this.DoubleBuffered = true; //控件缓冲,避免闪烁this.SetStyle(ControlStyles.ResizeRedraw, true);cl
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
