Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

C# Programming

MCI C# tracks length


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:

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc