共用方式為


DomainChange Event of the AxWindowsMediaPlayer Object

[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 DomainChange event occurs when the DVD domain changes.

[C#]
private void player_DomainChange(
  object sender,
  _WMPOCXEvents_DomainChangeEvent e
)

[Visual Basic]
Private Sub player_DomainChange(  
  sender As Object,
  e As _WMPOCXEvents_DomainChangeEvent
) Handles player.DomainChange

Event Data

The handler associated with this event is of type AxWMPLib._WMPOCXEvents_DomainChangeEventHandler. This handler receives an argument of type AxWMPLib._WMPOCXEvents_DomainChangeEvent, which contains the following property related to this event.

Property Description
strDomain System.StringIndicates the new domain. For possible values, see the Remarks section.

Remarks

The following table shows the possible values for the strDomain property.

String Description
firstPlay Performing default initialization of a DVD disc.
videoManagerMenu Displaying menus for whole disc. Also known as Root Menu or topMenu.
videoTitleSetMenu Displaying menus for current title set. Also known as titleMenu.
title Displaying the current title.
stop The DVD Navigator is in the DVD Stop domain.

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

IWMPDVD Interface (VB and C#)