How to change the value of a progress bar to a double?
<p>I am attempting to have a sound play at specific increments of a progress bar's progress. The progress bar has a max of 80 and is controlled by a timer that has an interval of 100 (thus total duration of 8 seconds). In the first case the sound plays because 80/16 = 5 which is an integer, but nothing else plays. How can I convert the progressbar value to a double? Or is that even the right track? Thank you!</p>

<pre><code>            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (1/16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (2 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (3 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (4 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (5 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (6 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (7 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (8 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (9 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (10 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (11 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (12 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (13 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (14 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (15 / 16)))
                hiphopkick.Play();
            if (checkBox1.Checked &amp;&amp; progressBar1.Value == (progressBar1.Maximum * (16 / 16)))
                hiphopkick.Play();
</code></pre>