Watching a Video on windows media player will produce black bars on the left and right.
this.MPlayer.stretchToFit = true;
AxWindowsMediaPlayer mPlayer = this.MPlayer;
mPlayer.URL = "Location of a file";

Below attached file output of the code.

Please suggest me how to change the aspect ratio of an Windows media player.

Sample.jpg

stretchToFit stretches the player to the size of the parent control. IIRC the player has a uiMode which can be set to custom. To get the width and height, you'll need something to determine the right values from the video file. Not sure if this player has those kind of capabilities.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.