Share via


Windows Media Player 11 SDK AxWindowsMediaPlayer.fullScreen (VB and C#) 

Windows Media Player SDK banner art

Previous Next

AxWindowsMediaPlayer.fullScreen (VB and C#)

The fullScreen property gets or sets a value indicating whether video content is played in full-screen mode.

[Visual Basic]
Public Overridable Property fullScreen As Boolean

[C#]
public virtual bool fullScreen {get; set;}

Property Value

A System.Boolean value that indicates whether content is played in full-screen mode. The default value is false.

Remarks

For full-screen mode to work properly when embedding the Windows Media Player control, the video display area must have a height and width of at least one pixel. If uiMode is set to "mini" or "full", the height of the control itself must be 65 or greater to accommodate the video display area in addition to the user interface.

If uiMode is set to "invisible", then setting this property to true raises an error and does not affect the behavior of the control.

During full-screen playback, Windows Media Player hides the mouse cursor when enableContextMenu equals false and uiMode equals "none".

If uiMode is set to "full" or "mini", Windows Media Player displays transport controls in full-screen mode when the mouse cursor moves. After a brief interval of no mouse movement, the transport controls are hidden. If uiMode is set to "none", no controls are displayed in full-screen mode.

Note   Displaying transport controls in full-screen mode requires the Windows XP operating system.

If transport controls are not displayed in full-screen mode, then Windows Media Player automatically exits full-screen mode when playback stops.

Example Code

The following example creates a button that uses the fullScreen property to switch an embedded player object to full-screen mode. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

[Visual Basic]
Public Sub fullScreen_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles fullScreen.Click

    ' If the player is playing, switch to full screen. 
    If (player.playState = WMPLib.WMPPlayState.wmppsPlaying) Then

        player.fullScreen = True

    End If

End Sub

FakePre-f448e01903b54a129873cda2f455332c-b0c099357c534262b6cfadc62e030413

private void fullScreen_Click(object sender, System.EventArgs e)
{
    // If the player is playing, switch to full screen. 
    if (player.playState == WMPLib.WMPPlayState.wmppsPlaying)
    {
        player.fullScreen = true;
    }
}

Requirements

Version: Windows Media Player 9 Series or later

Namespace: AxWMPLib

Assembly: AxInterop.WMPLib.dll (automatically generated by Visual Studio)

See Also

Previous Next