AxWindowsMediaPlayer.launchURL method

The launchURL method sends a URL to the user's default browser to be rendered.

Syntax

public void launchURL(
  System.String bstrURL
);

Public Sub launchURL( _
  ByVal bstrURL As System.String _
)

Parameters

bstrURL

The System.String that is the URL to launch.

Return value

This method does not return a value.

Remarks

This method only opens webpages using the HTTP or HTTPS protocols.

Examples

The following example creates a button that, when clicked, displays the Microsoft website in a new browser window. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

private void goToMS_Click(object sender, System.EventArgs e)
{
    // Open the Microsoft website. 
    player.launchURL("https://www.microsoft.com");
}

Public Sub goToMS_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles goToMS.Click

    ' Open the Microsoft website. 
    player.launchURL("https://www.microsoft.com")

End Sub

Requirements

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#)