SideShowGadget.ShowNotification Method (Int32, String, String)

Sends a notification from the gadget to all of its connected Windows SideShow-compatible devices.


Namespace: Microsoft.SideShow
Assembly: Microsoft.SideShow (in microsoft.sideshow.dll)

public void ShowNotification (
	int notificationId,
	string caption,
	string message
)
public void ShowNotification (
	int notificationId, 
	String caption, 
	String message
)
public function ShowNotification (
	notificationId : int, 
	caption : String, 
	message : String
)

Parameters

notificationId

A Int32 that identifies this notification.

caption

A String that represents this notification's caption.

message

A String that represents this notification's message body.

The following example code demonstrates how to send a basic notification.

private static void SampleShowNotification1()
{
    // Set the gadget's GUID.
    Guid gadgetId = new Guid("{0530B726-F6D5-4a66-900E-3C7673316F3B}");

    // Add the gadget's registry subkey and values.
    GadgetRegistration.Register(
        false,                           // Register gadget for current user only
        gadgetId,                        // Guid for the registry subkey
        ScfSideShowGadget.ScfEndpointId, // Endpoints registry value
        "Example SideShow gadget",       // FriendlyName registry value
        null,                            // StartCommand registry value
        null,                            // Icon registry value, this gadget will use the generic gadget icon.
        false,                           // OnlineOnly registry value
        GadgetCachePolicies.KeepNewest,  // CachePolicy registry value
        null);

    // Construct a Simple Content Format SideShow gadget for the gadget's Guid.
    using (ScfSideShowGadget gadget = new ScfSideShowGadget(gadgetId))
    {
        // Display the notification.
        gadget.ShowNotification(100, "New Message", "There is a new message in your inbox.");
        Thread.Sleep(10000);
    }
}

A notification will be shown for at least 5 seconds,


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista Home Premium, Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate

Target Platforms

Windows Vista Home Premium, Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate
Show: