在状态栏中显示复选框

实现效果:

  

知识运用:

  CheckBox控件的Checked属性  //获取或设置一个值  指示CheckBox是否处于选中状态

实现代码:

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox1.Checked == true)
                statusStrip1.Items[0].Text = "日期:" + DateTime.Now.ToString();
            else
                statusStrip1.Items[0].Text = "";
        }
原文地址:https://www.cnblogs.com/feiyucha/p/10176592.html