Click or drag to resize
Task Scheduler Managed Class Library

ShowMessageAction Class

Represents an action that shows a message box when a task is activated.
Note  Note
Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.
Caution note  Caution
This action has been deprecated in Windows 8 and later. However, this library is able to mimic its functionality using PowerShell if the PowerShellConversion property is set to All. To disable this conversion, set the value to Never.
Inheritance Hierarchy
SystemObject
  Microsoft.Win32.TaskSchedulerAction
    Microsoft.Win32.TaskSchedulerShowMessageAction

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.12.0
Syntax
C#
[XmlTypeAttribute(IncludeInSchema = true)]
[XmlRootAttribute("ShowMessage", Namespace = "http://schemas.microsoft.com/windows/2004/02/mit/task", 
	IsNullable = false)]
public sealed class ShowMessageAction : Action
Request Example View Source

The ShowMessageAction type exposes the following members.

Constructors
 NameDescription
Public methodShowMessageActionCreates a new unbound instance of ShowMessageAction.
Public methodShowMessageAction(String, String)Creates a new unbound instance of ShowMessageAction.
Top
Properties
 NameDescription
Public propertyActionTypeGets the type of the action.
(Inherited from Action)
Public propertyIdGets or sets the identifier of the action.
(Inherited from Action)
Public propertyMessageBodyGets or sets the message text that is displayed in the body of the message box.
Public propertyTitleGets or sets the title of the message box.
Top
Methods
 NameDescription
Public methodCloneCreates a new object that is a copy of the current instance.
(Inherited from Action)
Public methodCompareTo Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Inherited from Action)
Public methodDisposeReleases all resources used by this class.
(Inherited from Action)
Public methodEquals(Action)Indicates whether the current object is equal to another object of the same type.
(Overrides ActionEquals(Action))
Public methodEquals(Object)Determines whether the specified Object, is equal to this instance.
(Inherited from Action)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeReturns a hash code for this instance.
(Inherited from Action)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringGets a string representation of the ShowMessageAction.
(Overrides ActionToString)
Public methodToString(CultureInfo)Returns a String that represents this action.
(Inherited from Action)
Top
Events
 NameDescription
Public eventPropertyChangedOccurs when a property value changes.
(Inherited from Action)
Top
Fields
 NameDescription
Protected fieldunboundValuesList of unbound values when working with Actions not associated with a registered task.
(Inherited from Action)
Top
Remarks
Display a message when the trigger fires using the ShowMessageAction.
Example
C#
ShowMessageAction msg = new ShowMessageAction("You just got a message!", "SURPRISE");
See Also