Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMPSettings.isAvailable (VB and C#)
The isAvailable property (the get_isAvailable method in C#) gets a value that indicates whether a specified action can be performed.
Parameters
bstrItem
A System.String that is one of the following values.
| Value | Description |
| AutoStart | Discovers whether the autoStart property can be set to specify that Windows Media Player starts playback automatically. |
| Balance | Discovers whether the balance property can be used to set the stereo balance. |
| BaseURL | Discovers whether the baseURL property can be set to specify a base URL. |
| DefaultFrame | Discovers whether the defaultFrame property can be set to specify the default frame. |
| EnableErrorDialogs | Discovers whether the enableErrorDialogs property can be set to enable or disable displaying error dialog boxes. |
| GetMode | Discovers whether the getMode method can be used to retrieve the current loop or shuffle mode. |
| InvokeURLs | Discovers whether the invokeURLs property can be set to specify whether URL events should launch a Web browser. |
| Mute | Discovers whether the mute property can be set to specify whether the audio output is on or off. |
| PlayCount | Discovers whether the playCount property can be set to specify the number times a media item will play. |
| Rate | Discovers whether the rate property can be set to control the playback rate. |
| SetMode | Discovers whether the setMode method can be used to specify the current loop or shuffle mode. |
| Volume | Discovers whether the volume property can be set to specify the audio volume. |
Property Value
A System.Boolean value indicating whether the specified action can be performed.
Remarks
IWMPSettings.isIdentical is a property in Visual Basic that takes a parameter. In C# it is referred to as the IWMPSettings.get_isIdentical method.
Example Code
The following example tests each of the IWMPSettings properties using the isAvailable property (the get_isAvailable method in C#). The property name and the result of each test are displayed in a multi-line text box. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
' Create a string array that contains a list of IWMPSettings properties.
Dim propertyList As String() = New String(11) { _
"AutoStart", "Balance", "BaseURL", "DefaultFrame", "EnableErrorDialogs", _
"GetMode", "InvokeURLs", "Mute", "PlayCount", "Rate", "SetMode", "Volume" _
}
' Create another string array of the same size to hold the result of each
' call to get_isAvailable.
Dim results(12) As String
' Test each property using isAvailable and add the name of the property
' and the result of the test to the results array.
For i As Integer = 0 To (propertyList.Length - 1)
Dim isAvailable As Boolean = player.settings.isAvailable(propertyList(i))
results(i) = (propertyList(i) + " = " + isAvailable.ToString())
Next i
' Display the results in a multi-line text box.
playerSettings.Lines = results
FakePre-6d0615f82b6e4fc3853e2f9f792a9779-e99b914796544eafbe21e67fc961b5d1
// Create a string array that contains a list of IWMPSettings properties.
string[] propertyList = new string[12]{
"AutoStart", "Balance", "BaseURL", "DefaultFrame", "EnableErrorDialogs",
"GetMode", "InvokeURLs", "Mute", "PlayCount", "Rate", "SetMode", "Volume"
};
// Create another string array of the same size to hold the result of each
// call to get_isAvailable.
string[] results = new string[12];
// Test each property using get_isAvailable and add the name of the property
// and the result of the test to the results array.
for (int i = 0; i < propertyList.Length; i++)
{
bool isAvailable = player.settings.get_isAvailable(propertyList[i]);
results[i] = (propertyList[i] + " = " + isAvailable.ToString());
}
// Display the results in a multi-line text box.
playerSettings.Lines = results;
Requirements
Version: Windows Media Player 9 Series or later
Namespace: WMPLib
Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)
See Also
- IWMPSettings Interface (VB and C#)
- IWMPSettings.autoStart (VB and C#)
- IWMPSettings.balance (VB and C#)
- IWMPSettings.baseURL (VB and C#)
- IWMPSettings.defaultFrame (VB and C#)
- IWMPSettings.enableErrorDialogs (VB and C#)
- IWMPSettings.getMode (VB and C#)
- IWMPSettings.invokeURLs (VB and C#)
- IWMPSettings.mute (VB and C#)
- IWMPSettings.playCount (VB and C#)
- IWMPSettings.rate (VB and C#)
- IWMPSettings.setMode (VB and C#)
- IWMPSettings.volume (VB and C#)
| Previous | Next |