NetBlog主题

C#,纯WinForm打造指示灯
WinForm技巧

C#,纯WinForm打造指示灯

10143 11

核心代码如下private void button1_Click(object sender, EventArgs e){label1.Text = "●";//如果觉得太小调label1字体大小if (th == null || !th.IsAlive){th = new Thread(run);//添加线程 th.IsBackground = true;th.Start();}}Thread th;int ii = 0;private vo…