I'm trying to import WMPLib but Visual Studio but it's giving message
Type or Namespace name 'WMPLib' could not be found
.
I also tried using System.Windows.Media but again for Media it's giving same message.
I tried adding in toolbox Windows Media Player from
Choose Tool Box Items->Com Components->Windows Media Player
But this is not working.
To create the Windows Media Player control programmatically, you must first add a reference to wmp.dll, which is found in the \Windows\system32 folder. Adding this reference creates WMPLib.dll in your project folder, and a reference to WMPLib appears in Solution Explorer.
The following Link will help you.