Geekpedia Programming Tutorials






Play MP3 Files Using C#

This code uses the Windows Multimedia API winmm.dll library to play MP3 files. Put it into a class and call the Open() method with a parameter specifying the MP3 file that you wish to play.

On Thursday, April 17th 2008 at 12:18 AM
By Andrew Pociu (View Profile)
****-   (Rated 3.6 with 9 votes)
Contextual Ads
More C# Resources
Advertisement
  1. private string _command;
  2. private bool isOpen;
  3. [DllImport("winmm.dll")]
  4.  
  5. private static extern long mciSendString(string strCommand,StringBuilder strReturn,int iReturnLength, IntPtr hwndCallback);
  6.  
  7. public void Close()
  8. {
  9.    _command = "close MediaFile";
  10.    mciSendString(_command, null, 0, IntPtr.Zero);
  11.    isOpen = false;
  12. }
  13.  
  14. public void Open(string sFileName)
  15. {
  16.    _command = "open \"" + sFileName + "\" type mpegvideo alias MediaFile";
  17.    mciSendString(_command, null, 0, IntPtr.Zero);
  18.    isOpen = true;
  19. }
  20.  
  21. public void Play(bool loop)
  22. {
  23.    if(isOpen)
  24.    {
  25.       _command = "play MediaFile";
  26.       if (loop)
  27.        _command += " REPEAT";
  28.       mciSendString(_command, null, 0, IntPtr.Zero);
  29.    }
  30. }
Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this code snippet
Comment Current Comments
by }{ombr3 on Thursday, April 17th 2008 at 04:43 AM

It won't work... do i have to add any DLL reference?

by Andrei Pociu on Saturday, April 19th 2008 at 12:37 AM

No, but make sure you don't forget the using statement that's necessary for DllImport:

using System.Runtime.InteropServices;

by }{ombr3 on Monday, April 21st 2008 at 02:33 AM

i didn't forget that using statement, and i didn't get some compiler errors

by Deka on Monday, April 21st 2008 at 07:54 PM

Check your _command text, if it's wrong it won't play.

by }{ombr3 on Thursday, April 24th 2008 at 04:16 AM

i checked everything, and the code seems to be ok!

i also tried to run in debug/release mode and also copied the file to a local folder, but nothing helps -.-

by Pradeep on Saturday, April 26th 2008 at 06:47 AM

Please send the detailed explanation of this code

by Abhay on Wednesday, April 30th 2008 at 08:08 AM

Hey naice its working but i have little bit problem withit i.e. in which part o fcode ihave to used it instarting of wok with it

by Pico on Thursday, July 10th 2008 at 04:34 AM

That can be easily done by adding a reference to DirectX and using the audioplayback class.

by BHEKANANI on Monday, September 29th 2008 at 07:28 AM

the tutorial is not clear enough, Where do i put the winmm.dll file.

when I try to debug it i get this error, Unable to load DLL 'WINMM.DLL': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)

by BHEKANANI on Monday, September 29th 2008 at 07:35 AM

i copied the new dll file and it does'nt show any erros, but not playing

by Rohit Nadhe on Thursday, October 2nd 2008 at 06:27 AM

Here is the simple way...

//get file
string filePath = "C:/a.mp3";

//play file
System.Diagnostics.Process.Start(filePath);

Regards,
Rohit Nadhe
BE(E

by Rohit Nadhe on Thursday, October 2nd 2008 at 06:27 AM

Here is the simple way...

//get file
string filePath = "C:/a.mp3";

//play file
System.Diagnostics.Process.Start(filePath);

Regards,
Rohit Nadhe
BE(E

by Rohit Nadhe on Thursday, October 2nd 2008 at 06:27 AM

Here is the simple way...

//get file
string filePath = "C:/a.mp3";

//play file
System.Diagnostics.Process.Start(filePath);

Regards,
Rohit Nadhe
BE(E

by Rohit Nadhe on Thursday, October 2nd 2008 at 06:28 AM

Here is the simple way...

//get file
string filePath = "C:/a.mp3";

//play file
System.Diagnostics.Process.Start(filePath);

Regards,
Rohit Nadhe
BE(E

by Rohit Nadhe on Thursday, October 2nd 2008 at 06:28 AM

Here is the simple way...

//get file
string filePath = "C:/a.mp3";

//play file
System.Diagnostics.Process.Start(filePath);

Regards,
Rohit Nadhe
BE(E

by pico on Thursday, October 2nd 2008 at 07:42 AM

Rohit Nadhe please stop flood.

Your solution open an external soft to play the mp3 with the default soft define in the OS.

Useless if we want play mp3 thru c# soft

by bob esponja on Monday, December 15th 2008 at 03:43 PM

yeah yeah man, please explain this code !

by Kumar on Monday, February 16th 2009 at 06:19 AM

Once in the System Winamp or any Audio player is installed then only this code is woring....otherwise this code is not working...

Can anybody Send the Code to me to play a mp3 song to userdefined player...

by Todi on Friday, February 20th 2009 at 07:50 AM

A tip for easy mp3 and other format playback is irrKlang, http://www.ambiera.com/irrklang/ .

by 555 on Monday, March 2nd 2009 at 03:04 AM

444

by RAHUL on Thursday, March 12th 2009 at 01:35 AM

U R IDIOT......BE SERIOUS.......

by Jamesonh20 on Saturday, May 16th 2009 at 11:46 AM

I wrote all of the above code into an MP3 project I am trying to complete, it has no errors but does not play the selected mp3 file. Does anybody have the working complete source code?? Please send it to me if possible. Thanks Guys

by Jamesonh20 on Saturday, May 23rd 2009 at 03:24 PM

hey guys,
if you take the "if (isOpen)" out of the Play source code it will work. But it plays your selected file via the windows media player..weak..but it works.

by jason on Thursday, August 6th 2009 at 11:26 AM

hey dude this article stinks real bad. the code ain't workin! you need to explain code more clearly if you're going to write an ARTICLE. You can't just do a half-*

by Jamesonh20 on Thursday, August 6th 2009 at 11:20 PM

I agree this article is bad, however, the:

//play file
System.Diagnostics.Process.Start(filePath);

does work but it calls the windows media player to play the file path that you put in. So it doesn't use the application that you are building to play the file.

by Niwin on Sunday, August 23rd 2009 at 09:27 PM

This works for me..

using System;
using System.Runtime.InteropServices;

namespace Mp3player
{
class PlayMusic
{

private string _command;
private bool isOpen;

[DllImport("winmm.dll")]

private static extern long mciSendString(string strCommand,StringBuilder strReturn,int iReturnLength, IntPtr hwndCallback);

public void Close()
{

_command = "close MediaFile";

mciSendString(_command, null, 0, IntPtr.Zero);

isOpen = false;

}

public void Open(string sFileName)
{
_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = true;
}
public void Play(bool loop)
{
if(isOpen)
{
_command = "play MediaFile";
if (loop)
_command = " REPEAT";
mciSendString(_command, null, 0, IntPtr.Zero);
}
}
}
}

This is my Play class.

And this is the other part..

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Mp3player
{
public partial class Mp3Player : Form
{
PlayMusic p1 = new PlayMusic();
public String CurrentSong = "";

public Mp3Player()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
openFileDialog1.FileName = "";
openFileDialog1.Filter = "Mp3 (*.mp3)|*.mp3";
}

private void button1_Click(object sender, EventArgs e)
{
if (CurrentSong != "")
{
p1.Close();
p1.Open(CurrentSong);
p1.Play(true);
}
}

private void button2_Click(object sender, EventArgs e)
{
p1.Close();
}

private void button3_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
CurrentSong = openFileDialog1.FileName.ToString();
}
}
}
}

by James on Monday, August 24th 2009 at 07:24 PM

Niwin, you my hero! However I got everything to work with your code except for-->

_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";

this is giving me two errors, they are both ";" expected errors for the line of code above. Am I missing something??? Thanks!

by Geschickte on Sunday, December 13th 2009 at 08:48 PM

fix for that line:

public void Open(string sFileName)
{
_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = true;
}

by elgeniusz on Monday, December 14th 2009 at 08:58 PM

Hi! I'm trying to run this code as a thread(I'm new in that topic) but it doesn't work(program compiles etc. but the music is not playing), code works fine if it's not a new thread.

Anyway here is the code(similar to Niwin's one, I've only removed loop from Play()):

PlayMusic p1 = new PlayMusic();
p1.Open(Path.GetFullPath("...\\music\\" track.Next(22).ToString() ".mp3")); //random track out of 21 tracks from root folder
p1.Play();

and here is as a new thread:

PlayMusic p1 = new PlayMusic();
p1.Open(Path.GetFullPath("...\\music\\" track.Next(21).ToString() ".mp3"));
Thread t = new Thread(p1.Play);
t.IsBackground = true;
t.Start();

As I said first code works fine, program plays random music etc., just the 2nd code doesn't work. What is more if I ran a thread and Play() at the same time, there are two mp3s played(you can hear phase shift).

Thanks for your help!

by Jamesonh20 on Sunday, December 20th 2009 at 09:42 PM

Hey guys the -->

public void Open(string sFileName)
{
_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = true;
}

DOESN'T work it throws 4 errors (2 errors are from ;) the other two are only assignment increment, decrement, call, and new expressions can be used as a statement. AM I DOING SOMETHING WRONG?

by Jamesonh20 on Sunday, December 20th 2009 at 09:47 PM

Elgeniusz,
you are calling two songs @ the same time with your threads

1. p1.Open(Path.GetFullPath("...\\music\\" track.Next(22).ToString() ".mp3")); //random

2. p1.Open(Path.GetFullPath("...\\music\\" track.Next(21).ToString() ".mp3"));

by Pieces on Sunday, December 20th 2009 at 10:38 PM

I can't get get it to work when I use these methods in threads.

by Jamesonh20 on Monday, December 21st 2009 at 04:24 PM

I was thinking maybe you could use a "if....else" statement? What exactly are you trying to do? you mentioned that one thread 1. works fine, why use the second?

by elgeniusz on Monday, December 21st 2009 at 05:36 PM

If you are asking me, I want to play constantly random mp3s in a background. I think the best way to to this is to creat a new thread.

Now in my case everything works fine(mp3 is playing etc.) if it's not a new thread.

If I run the code as a new thread I can't hear the mp3.

by James on Tuesday, December 22nd 2009 at 11:48 AM

Elgeniusz, it sounds to me like you need to stop the code in the 1st thread b4 you start the second.

by Pieces on Tuesday, December 22nd 2009 at 02:03 PM

I can't even get one thread to work. The way I am doing it is by starting a new thread and if a certain condition is met the file is to play. But since it's in a thread it doesn't. If I try to play the file without threading it works just fine.

by Pieces on Tuesday, December 22nd 2009 at 02:04 PM

I can't even get one thread to work. The way I am doing it is by starting a new thread and if a certain condition is met the file is to play. But since it's in a thread it doesn't. If I try to play the file without threading it works just fine.

by Pieces on Tuesday, December 22nd 2009 at 02:04 PM

I can't even get one thread to work. The way I am doing it is by starting a new thread and if a certain condition is met the file is to play. But since it's in a thread it doesn't. If I try to play the file without threading it works just fine.

by elgeniusz on Tuesday, December 22nd 2009 at 04:26 PM

Pieces is asking for the same thing I wanted to ask: How to run this code in a thread?

by Pieces on Thursday, December 24th 2009 at 12:13 AM

Sorry for the spam. Elgeniusz, I though you said it worked on the first thread you called, and not on the third.

by Pieces on Thursday, December 24th 2009 at 12:13 AM

Second*

by James on Friday, December 25th 2009 at 12:43 PM

Guys I still can't get the code to work...Can someone give me an example of this code that compiles and runs?

public void Open(string sFileName)
{
_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = true;
}

by Pieces on Friday, December 25th 2009 at 01:16 PM

James, should be
_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";

I think. That will take care of the errors. Not 100% sure if it will work though. I can't remember exactly what I did to make it work.

by James on Friday, December 25th 2009 at 08:15 PM

Thank Pieces, that eliminated 2 errors @ runtime. However, I still get two "; expected" errors with the statement.

Can anyone spare their full source code that actually works w/o errors?? I've been trying to create this mp3 player for about a year now. all I really need is code for a play button to play an mp3 w/o having to use the system.diagnositcs.process.start(filename);

by James on Friday, December 25th 2009 at 09:09 PM

I'm not sure what is wrong... I took the above code that Niwin posted, and added the PlayMusic class. I still get the errors with:

_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";

ALSO, he has some sort of error with the "StringBuiler strReturn" in the code:

private static extern long mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback);

Any Thoughts???

by James on Friday, December 25th 2009 at 09:52 PM

Ok, it looks as if Niwin forgot to tell us that in the "PlayMedia" class that you have to add to your solution --> also add "using System.Text;" this will resolve the "StringBuilder strReturn" error! Now all we need is for someone to help solve the two "; expected" errors on the:

public void Open(string sFileName)
{
_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = true;
}

by James on Friday, December 25th 2009 at 10:02 PM

Okay Guys your welcome, 6beers later on Christmas Day and I fixed it! make sure to add the dll as a reference in the solution! Here is the source code:

Create a project called Mp3Player, THEN, add a class to your solution call PlayMusic.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Mp3Player
{
public partial class Mp3Player : Form
{
PlayMusic p1 = new PlayMusic();
public String CurrentSong = "";

public Mp3Player()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
openFileDialog1.FileName = "";
openFileDialog1.Filter = "Mp3 (*.mp3)|*.mp3";
}

private void button1_Click(object sender, EventArgs e)
{
if (CurrentSong != "")
{
p1.Close();
p1.Open(CurrentSong);
p1.Play(true);
}
}

private void button2_Click(object sender, EventArgs e)
{
p1.Close();
}

private void button3_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
CurrentSong = openFileDialog1.FileName.ToString();
}
}

}
}

*****NOW CREATE YOUR CLASS******

using System;
using System.Text;
using System.Runtime.InteropServices;



namespace Mp3Player
{
class PlayMusic
{
private string _command;
private bool isOpen;
[DllImport("winmm.dll")]

private static extern long mciSendString(string strCommand,StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback);

public void Close()
{

_command = "close MediaFile";

mciSendString(_command, null, 0, IntPtr.Zero);

isOpen = false;

}

public void Open(string sFileName)
{

_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = true;
}



public void Play(bool loop)
{
if (isOpen)
{
_command = "play MediaFile";
if (loop)
_command = " REPEAT";
mciSendString(_command, null, 0, IntPtr.Zero);
}
}
}
}



by James on Sunday, December 27th 2009 at 01:57 PM

**Update**
in the above code that I have posted replace the code below with the my last post (or just add the two signs infront and after sFileName)...



public void Open(string sFileName)
{

_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";
mciSendString(_command, null, 0, IntPtr.Zero);
isOpen = true;
}

by Pieces on Sunday, December 27th 2009 at 02:39 PM

James here is my source code of the media player. Good luck with your project.

http://ed708cfa.seriousfiles.com

by James on Monday, December 28th 2009 at 11:31 AM

Pieces, you are the MAN!!! Thanks so much, I know this is a simple project but I've been working on it for a longtime (trying to teach myself C#). I'm just know going back for a 4 yr degree in Computer Science this project has def helped me!

Thanks Again,
James

by James on Tuesday, December 29th 2009 at 11:45 PM

I have a trackbar control that I need linked to a playing media file. Can anyone help/Code?

by min on Wednesday, December 30th 2009 at 03:54 AM

Hi am trying to play the mp3 file in seperate thread. But it doest play any sound and strange thing is it doesnt throw any exception.. below is the code i used. If any suggestion plz suggest me.....







private string _command;

private bool isOpen;

[DllImport("winmm.dll")]
private static extern long mciSendString(string strCommand,StringBuilder strReturn,int iReturnLength, IntPtr hwndCallback);



public void Close()

{

_command = "close MediaFile";

mciSendString(_command, null, 0, IntPtr.Zero);

isOpen = false;

}



public void Open(string sFileName)

{

_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";

mciSendString(_command, null, 0, IntPtr.Zero);

isOpen = true;

}



public void Play(bool loop)

{

if(isOpen)

{

_command = "play MediaFile";

if (loop)

_command = " REPEAT";

mciSendString(_command, null, 0, IntPtr.Zero);

}

}

private void button1_Click(object sender, EventArgs e)
{
ThreadStart delPlay = delegate
{
Open(@"D:\Songs\01new\i love you.mp3");
Play(false);
};
Thread threadPlaySound = new Thread(delPlay);
threadPlaySound.Name = "threadPlaySound";
threadPlaySound.IsBackground = true;
threadPlaySound.Start();
}

by James on Wednesday, December 30th 2009 at 04:41 PM

Min, what using statements do you have (at the top of your code) make sure you have the using System.Runtime.InteropServices;

Do you by chance know how to link a media file playing a song/video to a trackbar???

by James on Wednesday, December 30th 2009 at 04:54 PM

Min, also put a sign infront of, and after sFileName....So it should look like this:

public void Open(string sFileName)
{

_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";

mciSendString(_command, null, 0, IntPtr.Zero);

isOpen = true;

}

by James on Wednesday, December 30th 2009 at 04:56 PM

Sorry it is not letting me post a plus sign. there needs to be a plus sign infront of, and after sFileName.

by James on Wednesday, December 30th 2009 at 07:40 PM

GUYS who are starting/having new thread issues-->
referenced from the book Windows Forms 2.0 Programming, PG 741...

Starting a thread is an asynchronous operation in that the current thread of excution continues, executing independently of the new thread. In '.NET, you start a new thread of execution by creating a Thread object from the System.Threading namespace, passing a delegate as the constructor parameter, and invoking the Start method.

Example:

//AsyncCalcPiForm.cs
using System.Threading;
...
partial class AsyncCalcPiForm : Form {
...
void CalcPi(int digits) {...}

Void calcButton_Click(object sender, EventArgs e)
{
this.calcToolStripProgressBar.Visible = true;
this.calcToolStripStatusLabel.Text = "Calculating...";

//Start pi calculation on new thread of execution
Thread piThread = new Thread(CalcPiThreadStart);
piThread.Start((int)This.decimalPlacesNumericUpDown.Value);
}

void CalcPiThreadStart(object digits)
{
//Convert thread start parameter to int
CalcPi((int)digits);
}
}

Hope this helped?

by min on Wednesday, December 30th 2009 at 11:35 PM

@James

if i comment the threading code then its working fine. But when i try to play in a separate thread it doesnt play any sound. You can see my full code below..

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using System.Threading;
using System.Runtime.InteropServices;

namespace WindowsApplication6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


private string _command;

private bool isOpen;

[DllImport("winmm.dll")]
private static extern long mciSendString(string strCommand,StringBuilder strReturn,int iReturnLength, IntPtr hwndCallback);



public void Close()

{

_command = "close MediaFile";

mciSendString(_command, null, 0, IntPtr.Zero);

isOpen = false;

}



public void Open(string sFileName)

{

_command = "open \"" sFileName "\" type mpegvideo alias MediaFile";

mciSendString(_command, null, 0, IntPtr.Zero);

isOpen = true;

}



public void Play(bool loop)

{

if(isOpen)

{

_command = "play MediaFile";

if (loop)

_command = " REPEAT";

mciSendString(_command, null, 0, IntPtr.Zero);

}

}

private void button1_Click(object sender, EventArgs e)
{
ThreadStart delPlay = delegate
{
Open(@"D:\Songs\01new\i love you.mp3");
Play(false);
};
Thread threadPlaySound = new Thread(delPlay);
threadPlaySound.Name = "threadPlaySound";
threadPlaySound.IsBackground = true;
threadPlaySound.Start();
}
}
}

by Anne18 on Monday, February 8th 2010 at 12:08 PM

hi guys i am new in C# and still searching and learning from tutorials. is there a way to play mp3 music in background? i mean no buttons. If you run the form it will automatically play. tnx..

by jamesonh20 on Monday, February 8th 2010 at 12:18 PM

Yes Anne, put your code just underneith your

Public form1()
{
InitializeComponent()
CODE GOES HERE...
}

by Saurabh Prajapati on Thursday, May 13th 2010 at 06:49 AM

I want to play Mp3 File using thread in background. but thread will not play sound and also not thrown error. Without thread it works fine. Here is the code....




private void Form2_Load(object sender, EventArgs e)
{
ThreadStart threadDelegate = new ThreadStart(Test);
Thread newThread = new Thread(threadDelegate);
newThread.IsBackground = true;
newThread.Start();
}

private void Test()
{

string FileName = "C:\\test.mp3";
mciSendString("open \"" FileName "\" type mpegvideo alias MediaFile", null, 0, IntPtr.Zero);
mciSendString("play MediaFile", null, 0, IntPtr.Zero);
int status = 1;
while (status == 1)
{
StringBuilder returnData = new StringBuilder(128); // MCI return data
mciSendString("status MediaFile mode", returnData, 128, IntPtr.Zero);
if (returnData.Length == 7

by Saurabh Prajapati on Saturday, May 15th 2010 at 06:37 AM

I want to play Mp3 File
using thread in background. but thread will not play sound and also not thrown error. Without thread it works fine.

Any solution Plz.....

by min on Sunday, May 16th 2010 at 12:42 AM


use windows media player contrl.

In toolbox right click and select "Choose Items" from popup menu.
click to "COM Components" tab.
Select "Windows Media Player" then click ok.
Now add the "Windows Media Player" control in your form. Default name of the control is axWindowsMediaPlayer1

now put the below code in click event of button1.

private void button1_Click(object sender, EventArgs e)
{
ThreadStart delPlay = delegate
{
this.axWindowsMediaPlayer1.URL = @"E:\Songs\abba__I_have_a_dream.mp3";
};

Thread threadPlaySound = new Thread(delPlay);
threadPlaySound.Name = "threadPlaySound";
threadPlaySound.IsBackground = true;
threadPlaySound.Start();
}


it works fine.

Note :dont forget to use name space
using System.Threading;


by Saurabh Prajapati on Tuesday, May 18th 2010 at 08:09 AM

Min actually my question is that i want to play MP3 song without using windows media player(axWindowsMediaPlayer1).

so i have used the mciSendString command to play song.

But this command works fine if i am not using thread. but i want to play continuous sound in my background application.

so when i use the thread the sound does not comes. even error is also not thrown.

anything else...?

thanks for reply

by Min on Tuesday, May 18th 2010 at 08:13 AM

yeah i got the same problem before and i could not find any solution for mciSendString. I used the axWindowsMediaPlayer1 control for same purpose. What's the problem you can hide the windows media player control.

thanks...

by VK on Wednesday, June 23rd 2010 at 02:29 AM

please give me a simple way to make mp3player using c# And Ado.net.i m waiting please must reply

by VK on Wednesday, June 23rd 2010 at 02:29 AM

please give me a simple way to make mp3player using c# And Ado.net.i m waiting please must reply


Comment Comment on this tutorial
Name: Email:
Message:
Comment Related Source Code
There is no related code.

Comment Related Tutorials
There are no related tutorials.

Jobs C# Job Search
My skills include:

Enter a City:

Select a State:


Advanced Search >>
Advertisement

Free Magazine Subscriptions

Today's Pictures

Today's Video

Other Resources

Latest Download

Latest Icons