3
Answers

make a slider control to "slide" automatically while playing mp3 file

bodnar edmond

bodnar edmond

15y
7k
1

hello, i am making an mp3 player and i have this code which works fine when i'm trying to set the position of the current playing file.
what i don't know is how to make the slider control to automatically slide when i click the play file.
this is the code i have:
DoubleAnimation animatie = new DoubleAnimation();                                              
            animatie.Duration = player.NaturalDuration;                      
            player.Pause();          
            player.Position = TimeSpan.FromSeconds(slider_position.Value);
            player.Play();           
            if (player.NaturalDuration.HasTimeSpan)
            {
                slider_position.Minimum = 0;
                slider_position.Maximum = player.NaturalDuration.TimeSpan.TotalSeconds;
            }           
 
i hope i made myself clear enough
Answers (3)
0
Danatas Gervi
NA 1.4k 0 15y

If you needs so strange behavior, I suggest you to write user control – 3 textboxes with textBox1.MaxLength = 30; - for each.

So you can write propertie in this user control – "Get Three Rows" – in this property collect texts from all textboxes.

0
Roei Bar
NA 7.8k 0 15y
here is a nice post from CodeProject, its basically a Javascript Validation for Textarea

http://www.codeproject.com/KB/aspnet/Extended_ASPNET_TextBox.aspx?display=Print

and another one

http://www.codeproject.com/KB/aspnet/Textarea_Length_Validator.aspx?df=100&forumid=278964&exp=0&select=1412646

dont forget to mark this as "Accepted Answer"