ProgressBar with percentage read out
<p>I tried to put a <code>label1.text = progressbar1.value.ToString();</code> and it would not read out how much it has progressed.  This is what I have so far with some help.</p>

<pre><code>namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            progressBar1.Value = s_Checks * (progressBar1.Maximum / TOTAL_CHECKBOXES);

            label1.Text = progressBar1.Value.ToString();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
        }

        private const Int32 TOTAL_CHECKBOXES = 4;

        private static Int32 s_Checks = 0;

        private void OnCheckedChanged(object sender, EventArgs e)
        {
            if (((CheckBox)sender).Checked)
                ++s_Checks;
            else
                --s_Checks;

            progressBar1.Value = s_Checks * (progressBar1.Maximum / TOTAL_CHECKBOXES);
        }

        private void progressBar1_Click(object sender, EventArgs e)
        {
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (((CheckBox)sender).Checked)
                ++s_Checks;
            else
                --s_Checks;

            progressBar1.Value = s_Checks * (progressBar1.Maximum / TOTAL_CHECKBOXES);
        }

        private void checkBox2_CheckedChanged(object sender, EventArgs e)
        {
            if (((CheckBox)sender).Checked)
                ++s_Checks;
            else
                --s_Checks;

            progressBar1.Value = s_Checks * (progressBar1.Maximum / TOTAL_CHECKBOXES);
        }

        private void checkBox3_CheckedChanged(object sender, EventArgs e)
        {
            if (((CheckBox)sender).Checked)
                ++s_Checks;
            else
                --s_Checks;

            progressBar1.Value = s_Checks * (progressBar1.Maximum / TOTAL_CHECKBOXES);
        }

        private void checkBox4_CheckedChanged(object sender, EventArgs e)
        {
            if (((CheckBox)sender).Checked)
                ++s_Checks;
            else
                --s_Checks;

            progressBar1.Value = s_Checks * (progressBar1.Maximum / TOTAL_CHECKBOXES);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (checkBox1.Checked || checkBox2.Checked || checkBox3.Checked || checkBox4.Checked == true)
            {
                checkBox1.Checked = false;
                checkBox2.Checked = false;
                checkBox3.Checked = false;
                checkBox4.Checked = false;
            }
        }

        private void clearCheckBoxToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (checkBox1.Checked || checkBox2.Checked || checkBox3.Checked || checkBox4.Checked == true)
            {
                checkBox1.Checked = false;
                checkBox2.Checked = false;
                checkBox3.Checked = false;
                checkBox4.Checked = false;
            }
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close(); 
        }

        private void label1_Click(object sender, EventArgs e)
        {
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            label1.Text = progressBar1.Value.ToString();
        }
    }
}
</code></pre>
