Full screen WMP

Hoongz

Active member
Joined
Nov 22, 2007
Messages
32
Programming Experience
1-3
Even if I set fullScreen to full, everytime i use AxMediaPlayer.CtlControls.Stop the player exit full screen mode. Thus i resort to using AxMediaPlayer.fullScreen = True. This inturn gives me a error
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Any help on this?
 
WMP exits fullscreen when stopped, it's default behaviour. Fullscreen is available initially in designer and when media is playing, a user can select fullscreen by using the context menu or doubleclick screen only when media is playing. Programatically you have to set Fullscreen property after loading media.

Did you want to put the player in fullscreen again automatically if it starts to play again? Code here does that:
VB.NET:
Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) _
Handles AxWindowsMediaPlayer1.PlayStateChange
    If DirectCast(e.newState, WMPLib.WMPPlayState) = WMPLib.WMPPlayState.wmppsPlaying Then
        Me.AxWindowsMediaPlayer1.fullScreen = True
    End If
End Sub
 
Back
Top