Hi,
I use MCI to play mp3 tracks. I wrote very simple player where I put
the path to mp3 files and press the button play. Everything works
excellent but I want to make my player better and know the length of a
track to show current position of the track on the TrackBar. I
imported :
[DllImport("winmm.dll")]
private static extern long mciSendString(string strCommand,
StringBuilder strReturn, int iReturnLength, IntPtr
hwndCallback);
and I use it to play the tracks. How to use this function or other to
do what I want? Please help me.
DllImport("winmm.dll")
private static extern long mciSendString(string strCommand,
StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback);
string sCommand = "............."; //see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mult...
for a complete list of commands
StringBuilder sBuffer = new StringBuilder(128);
mciSendString(sCommand, sBuffer, sBuffer.Capacity, IntPtr.Zero);
p.s. just follow the link I've put
HTH :)
_nabuchodonozor je napisao/la:
> Hi,
> I use MCI to play mp3 tracks. I wrote very simple player where I put
> the path to mp3 files and press the button play. Everything works
> excellent but I want to make my player better and know the length of a
> track to show current position of the track on the TrackBar. I
> imported :
> [DllImport("winmm.dll")]
> private static extern long mciSendString(string strCommand,
> StringBuilder strReturn, int iReturnLength, IntPtr
> hwndCallback);
> and I use it to play the tracks. How to use this function or other to
> do what I want? Please help me.