Search code examples
c#winformswindows-media-playeraxwindowsmediaplayer

Multiple instances of axwindowsmediaplayer and only one allowing full screen mode


My application spawns multiple instances of axWindowsMediaPlayer (one per form). When playing one file, setting to full screen isn't an issue however, when playing 2 files (with a media player per monitor) it won't allow both to go into full screen mode (the option is greyed out in the context menu on the second video and error's when I try setting it in code).

Is this a limitation of axwindowsmediaplayer?


Solution

  • I've managed to work out a work around for this but will not mark this as an answer unless I don't get any other feedback as I still feel this is cheating a little.

    Rather than using the wmPlayer.fullScreen property. Do this instead:

    wmPlayer.Height = this.Height; //this being the form
    wmPlayer.Width = this.Width;
    wmPlayer.stretchToFit = true;