MediaCenter.DialogNotification Method

Shows a modeless notification dialog box.

Note   This method has been deprecated.

Syntax

  MediaCenter.DialogNotification(
  text
  , 
  buttons
  ,
   nTimeout, sImagePath
  , 
  onClose
  )

Parameters

text

A String that contains the text of the body of the dialog box.

buttons

A collection containing strings and integers that define the buttons to include in the dialog box. For each string in the collection, the method adds a custom button that contains the string. For each number, the method creates a standard button. The standard buttons have the following values:

Value Description
1 OK button
2 Cancel button
4 Yes button
8 No button

nTimeout

A Number (long) that indicates the time-out duration, in seconds, for the dialog box, at the end of which the dialog box will automatically close. The minimum time-out duration is five seconds, and the maximum is 120 seconds.

sImagePath

A String that specifies the path to the PNG-format image to display in the dialog box.

onClose

A String that contains the name of an application-defined event handler. When the dialog box is dismissed, Windows Media Center calls the event handler, passing an integer value that indicates how the dialog box was dismissed. It is one of the following values:

Value Description
0 OK button
1 Cancel button
2 Yes button
3 No button
5 Timed out

If the user clicked a custom button, the event handler receives an integer value greater than or equal to 100. Windows Media Center assigns integer values to custom buttons; the first custom button has a value of 100, the second has a value of 101, and so on.

Return Value

This method returns 4 when it succeeds, indicating that the dialog box is active. If a different value is returned, this method failed.

Remarks

A notification dialog box is a window that appears briefly to notify the user of a particular event. It displays an image, text, and the specified buttons. The dialog box disappears when the user clicks a button, or when the associated time-out duration expires.

Requirements

Platform: HTML application hosted within Windows XP Media Center Edition 2004 through Windows Vista

See Also