Hi
I have 10 hour recorded sound and now i need to reach a piece of it my mean is when i click on one button from this sound minutes 6:45 atart to play but not begin from the beggining of the sound i want it start from 6:45 and after 5 second it stop how it is possible?
i have to use SoundPlayer or axWindowsMediaPlayer?
Thank you
Loading

Kirtan PatelRank #292 · 8.6K reputationPosted Aug 17, 2009, 5:07 AM EDT
Download Windowsbase.dll
Maharaje124 reputationPosted Aug 15, 2009, 8:56 PM EDT
your sample was great but i think you don't get my mean in your sample the music start from minute 00:01
but i want it start from 03:45 i think now i say clear now how i can do it?
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 16, 2009, 2:53 AM EDT
Step 2
Step 3
using System.Windows.Media;
namespace WindowsFormsApplication32
{
public partial class Form1 : Form
{
MediaPlayer m;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// Create Instance
m = new MediaPlayer();
m.Open(new Uri(@"D:\Songs\Angel.mp3"));
m.Play();
//Set Position Where you want to Start
m.Position = new TimeSpan(0, 1, 50);
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
// Current Position of MediaFile
label1.Text = m.Position.ToString();
}
}
Maharaje124 reputationPosted Aug 16, 2009, 3:31 AM EDT
but unfortunately i don't find "using System.Windows.Media;" i have only:
Using System.Media
and i couldn't instance MediaPlayer because i can't find it mean there isn't it(MediaPlayer)
i really want help you with check it but also have problem and it isn't solve
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 16, 2009, 3:53 AM EDT
Here is Project Files of Mine Take a look so that you can understand it Better
Download Project Files
Maharaje124 reputationPosted Aug 16, 2009, 4:38 AM EDT
i can't find it in the web
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 16, 2009, 5:49 AM EDT
PresentationCore.dll Download
and if still not work Update your Visual Studio i think Microsoft has released Update for that
Maharaje124 reputationPosted Aug 16, 2009, 4:55 PM EDT
you said me if it dosen't work i have to update my visual studio but i have a question:
if you update your visual studio so its version is higher than mine and absoloutly it shouln't run in mine visual studio but it ran and it's strange. why your file ran in my system and mine don't run? i have an error:
"Error 1 The type 'System.Windows.Freezable' is defined in an assembly that is not referenced. You must add a reference to assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. "
PLZ Help me
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 16, 2009, 7:55 PM EDT
Seems You have not added reference to WindowsBase.dll
Thats why you are getting this .
Add Reference to that File it will be fine .
Maharaje124 reputationPosted Aug 17, 2009, 4:49 AM EDT
from where i can find it? would you mind to send it for me plz?
Maharaje124 reputationPosted Aug 17, 2009, 5:19 AM EDT
Honesty Pays
Good Luck