Windows Media Player 10 SDK


I was playing around the other day and I wanted to be able to put the ability to play some video into an application I was building.  I thought to myself how nice it would be if I could just put Media Player into my application.  Of course I would want to be able to control it from code and get some events off of it.

Then I found the Windows Media Player 10 SDK. Once you install the SDK you will be able to add Windows Media Player as a control to your page. 

Check out the sample in C:\WMSDK\WMPSDK10\samples\dotNet\VB.  This sample is a good example of using the control and adding both MP3 (and other formats) and video to your applciaitons.  It is pretty straight forward and you don't need alot of code to do it.

There is an older VB 6.0 example at C:\WMSDK\WMPSDK10\samples\vb6\DVDPlayer that shows you how to use the SDK to build a simple DVD Player.


Comments (6)

  1. You can add it to your page – or to any COM client – without installing the SDK. It’s an ActiveX control. The SDK is merely documentation, tools, and samples to assist developers with what’s already available in a runtime (i.e., Windows Media Player). Web sites have actually been embedding WMP, Real, QuickTime, and more for years using the CLSID (at least in Internet Explorer).

    In a Windows Forms (.NET) project, for example, customize your toolbox and add – using the COM tab – the Microsoft Windows Media Player component. When you drag that onto a Windows Forms, two interop assemblies are created from the WMP library and you know how access to WMP programmatically. It works basically the same (sans the interop assemblies) for VB6.

  2. Brad McCabe says:

    I always like the additional documentations, samples, and tools of the SDK, but as you point out if you want a more "light weight" approach you can reference the COM component directly.

  3. Rich says:

    This is fine for embedding the player INTO your app, but can Media Player itself (running outside) be controlled from an app?

  4. Stan says:

    Hey Guys, where can i find this fileC:WMSDKWMPSDK10samplesdotNetVB?

    I’m trying to run windows media player from my VB program. How do i do so?

  5. Daniel says:

    Hi, does anyone know how i can control Windows Media Player (like the play, pause, stop, next, previous commands). I dont want to embed it into my program… i want to control the actual thing (like the Media Keys on your keyboard can do).

  6. annoymous says:

    hey guys, i want to invoke media player in pocket pc? Any idea?

Skip to main content