Skip to main content

Posts

Showing posts from September, 2012

Playing with Windows Media Player

Microsoft has given ability to its development tool to suit the requirement as per developer wish. I had a requirement which needs to play multiple instances of media player on a single monitor. As a feature we know Media player can have only one instance running at a time. So I was scratching my head and finally a solution struck me, which is embedding multiple Media player instances on a single Win Form. I've used C#.net and Windows Media Player library to solve the problem. Let's a have a look in the below sample program, the code is quite self explanatory. This sample code created an array of 2 Windows Media player instances and playing two audio (mp3) files simultaneously. The Recreate button destroys the previous instances and creates two more new one. This is a very basic code and it can be modified as per more complex requirement. However, running large number of multiple instances of Windows Media Player isn't advisable. using System; using System.Collections...