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 PatelPosted Aug 17, 2009, 9:07 AM
Download Windowsbase.dll
MaharajePosted Aug 17, 2009, 9:19 AM
Honesty Pays
Good Luck
MaharajePosted Aug 17, 2009, 8:49 AM
from where i can find it? would you mind to send it for me plz?
Kirtan PatelPosted Aug 16, 2009, 11:55 PM
Seems You have not added reference to WindowsBase.dll
Thats why you are getting this .
Add Reference to that File it will be fine .
MaharajePosted Aug 16, 2009, 8:55 PM
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 PatelPosted Aug 16, 2009, 9:49 AM
PresentationCore.dll Download
and if still not work Update your Visual Studio i think Microsoft has released Update for that
MaharajePosted Aug 16, 2009, 8:38 AM
i can't find it in the web
Kirtan PatelPosted Aug 16, 2009, 7:53 AM
Here is Project Files of Mine Take a look so that you can understand it Better
Download Project Files
MaharajePosted Aug 16, 2009, 7:31 AM
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 PatelPosted Aug 16, 2009, 6:53 AM
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();
}
}
MaharajePosted Aug 16, 2009, 12:56 AM
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?