Partager via


AxWindowsMediaPlayer.versionInfo property

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The versionInfo property gets a value that specifies the version of the Windows Media Player.

This property is read-only.

Syntax

public System.String versionInfo {get;}

Public ReadOnly Property versionInfo As System.String

Property value

A System.String that is the version information in the following format: "X.0.0.YYYY" where X represents the major version number and YYYY represents the build number.

Examples

The following example creates a button that, when clicked, displays a message box containing the version information for Windows Media Player. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

private void showVersion_Click(object sender, System.EventArgs e)
{
    // Build the message containing the version info. 
    string message = ("Windows Media Player Version: " + player.versionInfo);

    // Display the message. 
    System.Windows.Forms.MessageBox.Show(message);
}

Public Sub showVersion_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles showVersion.Click

    ' Build the message containing the version info. 
    Dim message As String = ("Windows Media Player Version: " + player.versionInfo)

    ' Display the message. 
    System.Windows.Forms.MessageBox.Show(message)

End Sub

Requirements

Requirement Value
Version
Windows Media Player 9 Series or later
Namespace
AxWMPLib
Assembly
AxInterop.WMPLib.dll (AxInterop.WMPLib.dll.dll)

See also

AxWindowsMediaPlayer Object (VB and C#)