.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Getting the current song name in Windows Media Player (C#)

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :.NET Framework
how can I get the songname (and songtime, songlength) from the song that is currently playing in wmplayer?  This is from an external application, not a plugin.

View Complete Post

More Related Resource Links

Windows Media Player - Please Help


I am trying to get windows Media Player working with C# I have not been able to get it to display anything. I have read most of the links on the web and tried different .dll's and they just do not display any Video. I can get sound but no video. Can any one tell me what is going on. I am using and Master Page and Content page.



how to upload video in sql2005 and how to retrieve it and play in windows media player



i am developing web portal, which suppose to upload video in sql2005 and should be able to retrieve that video on request

and play in aspx page with windows media player.


Windows Media Player control drops out of fullscreen on Windows notifications



My app uses the Windows Media Player control to display video in fullscreen. It's vital that it remain fullscreen until the user has specifically exited it (using the escape key). However, WMP control exits full screen seemingly on any notification coming up on Windows 7. Windows update notices, anti-virus update alerts, etc. 

Is there anyway to force WMP control to stay fullscreen, or force suppression of ALL notification messages?

Windows Media Player control drops out of fullscreen on Windows notifications




Not sure if WPF is the best place to post this but anyhow...


My app uses the Windows Media Player control to display video in fullscreen. It's vital that it remain fullscreen until the user has specifically exited it (using the escape key). However, WMP control exits full screen seemingly on any notification coming up on Windows 7. Windows update notices, anti-virus update alerts, etc.


Is there anyway to force WMP control to stay fullscreen, or force suppression of ALL notification messages?

Why does this not work? Windows media player embedd trying to pause.


Title says it all, it pauses my player, but when i press play again theres no sound, it is playing but without sound, yeah the volume is up.



 void wmp_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
  if (!Properties.Settings.Default.AutoStartPlaying)
  if (wmp.playState == WMPLib.WMPPlayState.wmppsPlaying && eerstekeer)
   eerstekeer = false;

Resource File: Windows Media 9 Series Digital Rights Management


If you have an application that handles Windows Media content and you need an effective way to track content usage, Windows Media 9 Series now offers Digital Rights Management (DRM). It allows you to take advantage of the peer-to-peer distribution model and still redirect users back to your app once they have downloaded your content (prior to viewing).

MSDN Magazine May 2003

DirectShow: Core Media Technology in Windows XP Empowers You to Create Custom Audio/Video Processing


DirectShow is an API that enables Windows applications to control a wide variety of audio/video input devices including (but not limited to) DV camcorders, Web cams, DVD drives, and TV tuner cards. It provides out-of-the-box support for a variety of formats, from WAV and AVI to Windows Media. DirectShow is also extensible, enabling third parties to support their own specialized devices, formats, or processing components. This article introduces the basic concepts behind DirectShow and gives a step-by-step tutorial showing how to create your own video effect filter.

Michael Blome and Mike Wasson

MSDN Magazine July 2002

adding Window Media Player into IE Toolbar

Hello: I am facing a problem in adding a Window Media Player Control into IE ToolBar. I found a project written in C# on Code Project site that can add a text into IE toolBar. But I can't add the window Media Player into IE. The Project I found constitutes of 2 projects BandOjLib and SampleBars window Application C sharp where the development is happening in it. So what you do in SampleBars project will be embedded into BandObj Project after compilation and start without debugging both BandObj and SampleBars respectively. When I am adding the Window Media Player into TOOLBOX, then to drag it into window Form => it gives me this error: Assembly generation failed -- Referenced assembly 'AxInterop.WMPLib' does not have a strong name. I have tried to give it a strong name but with no vain???? I am sending you the project link http://www.codeproject.com/csharp/dotnetbandobjects.asp?select=1113574&df=100&forumid=3788&noise=1&mpp=50&fr=51#xx1024015xx. So please if you have any advice try to inform me.   Regards, R0nda

Windows Keyup event is routed to next form even if the current form is closed

In a form (say FormA) i have 2 events "Keyup" for the form and button_click event for the button. I call FormA from the main form with a showDialog, after this i call another form (say FormB), it also has the 2 events. In both the form the button_click event has the logic to close the form (this.close()). Now when the FormA is opened the focus is on button, if the user presses "enter" button the button_click event is called which closes the form, the logic returns to the main form and the next line i.e. to open the FormB is executed. Now here is the wierd part, in FormB because there is a KeyUp event handler; just after instantiation of the form directly this event handler is called. I guess this is being routed from FormA. Shouldnt the FormA's keyup event be closed as soon as the form is closed?

Silverlight media player control for mvc

I wamnted to add a silverlight media player to my MVC site. there was a silvlight Media player that you could drag and drop on a page from the tool box, but I cant find it anymore. I am not sure it was good for mvc anyhow,   what is the easiest way to get a silverlight media player up and running on a mvc site, I really dont want to make my own, incorarating a silverlight app just for the media playerr seems like a fair bit of work, i was really looking for the drag and drop option we had in VS2008  I'm using VS2010 .net 4 silverlight 4 Any ideas?

Windows Media Services 2008 and the Media Web Part

I have Media Services 2008 installed and working (tested with Windows Media Player, works fine) and a SharePoint 2010 Enterprise installation. I want to use the Media web part to display content from Media Services 2008. Is this possible using an MMS:// style url? Or does the media web part only like http:// or "local" content ? Media Services 2008 is installed without http:// components at the moment, but I can't find any information about what the media web part supports so don't know if it will work with mms://

Converting System.Windows.Media to System.Drawing objects

Hello, I want to know if it's possible to convert the System.Windows.Media objects Color and Imaging.BitmapSource to the System.Drawing objects Color and Bitmap and the other way around. If yes, how can I do this?

How to check for media player and real player are installed ?

 Hi, All    I am using the media player and real player video controls they work fine in ie. How can I check they are installed in all main browsers like firefox and chrome and ie if not installed ?. Many Thanks Kered

Silverlight media player change source and play from javascript

I am having trouble accessing an embedded Silverlight 2 media player in an aspx page from Javascript and was hoping someone might offer some insight on what's going on. What I want to do is fire a javascript event on the client when a button is pressed to change the Silverlight media player media source and then play the newly selected file. I found what seemed like a pretty straightforward example on the silverlight.net site that looked like this:<%@ Page Title="" Language="VB" MasterPageFile="~/master.master" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %> <%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="Middle" Runat="Server"> <asp:MediaPlayer ID="Media1" runat="server" Height="240px" Width="320px"> </asp:MediaPlayer> <button id="Button1" onclick="onPlay()" type="button">Play</button> <script type="text/javascript"> function onPlay() { try { var player = $find("ctl00_Middle_Media1"); player.set_mediasource("example.mp3");

Help with an InvalidCastException with Windows Media Services on Windows Server 2008 R2

Hi, I developed an application that utilizes content from Windows Media Services. The entire application was written in C# on a Windows Server 2008 x86 environment using the interop assemblies provided by Microsoft. Everything works fine, except when I try to run the application on a 64-bit machine. When I run the application on the 64-bit machine, I get the following error: Unable to cast COM object of type 'Microsoft.WindowsMediaServices.Interop.WMSServerClass' to interface type 'Microsoft.WindowsMediaServices.Interop.IWMSServer'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{845FB958-4279-11D2-BF23-00805FBE84A6}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)). I tried looking for an updated interop assembly, but couldn't locate anything newer than the one that I was already using. Does anyone know how to get over this hurdle?

System.Windows.Shapes.Ellipse to 'System.Windows.Media.Geometry'



is there a way to use  System.Windows.Shapes.Ellipse or other shapes where  'System.Windows.Media.Geometry' is required?

Live audio-video streaming in an asp.net website using windows media encoder


The project is to provide the facility of providing live lectures in an intranet. So the bandwidth is not an issue. Also it means that I cannot use any internet streaming server like ustream (the project being limited to intranet).

I created a C# console application and successfully created a live stream using windows media encoder sdk. I was also able to capture the stream on another LAN PC in VLC player.

I want to know if I can implement this in my asp.net website. It should be something like this : The faculty visits the site and clicks on a start button on a webpage. This will start the live stream of the faculty. It will be received by the students on different computers by accessing the same website. Also, the faculty should be able to view himself on the webpage (just like in the windows media encoder predefined UI).

Is this possible to implement in the website? I mean both the facutly and the student will implement the same website. Also, the stream has to pass via a streaming server.

Or do I need to create a different application to start streaming and the students will view the stream from the website?

Also, which player do I embed to view the stream? Windows media player (I heard that it has issues with firefox) or the ever-available flash player? Will the flash player be able to capture the media encoder stream?

Please share a

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend