How to check text in textbox?
<p>I'm trying to make a VideoClub application. I have a textbox named <code>txtMovieDuration</code>, where I want to type in the movie duration ofc.<br>
What I did is, I allowed the user to write ONLY numbers in this format (hh:mm:ss). The dots appear automatically.
BUT, there is this problem, that logicaly ss (seconds) and mm (minutes) can't be bigger than <code>59</code> (cuz they only go from 0 to 59). How can I check seconds and minutes to be <code>&lt; 60</code> ?</p>

<pre><code>private void txtMovieDuration_TextChanged(object sender, EventArgs e)  
        {  
            txtMovieDuration.MaxLength = 8;

            if (txtMovieDuration.Text.Length == 2)
            {
                txtMovieDuration.Text += ":";
            }

            if (txtMovieDuration.Text.Length == 5)
            {
                txtMovieDuration.Text += ":";
            }

            txtMovieDuration.SelectionStart = txtMovieDuration.Text.Length;
         }
</code></pre>
