The Taskbar Notification Component

Introduction

This component allows you to display MSN-style skinned popup notifications.

Usage

Using this component must be done from your code. The following code snippet shows how you can display a notification using your own custom background and button images.

	NETXP.Components.TaskbarNotifier tn;
	tn = new NETXP.Components.TaskbarNotifier();
	tn.NormalTitleColor = SystemColors.HotTrack;
	tn.NormalTitleFont = new Font(tn.NormalTitleFont, FontStyle.Bold);
	tn.NormalContentColor = SystemColors.WindowText;
	tn.HoverContentColor = SystemColors.HotTrack;
	tn.HoverTitleColor = SystemColors.ActiveCaption;
	tn.HoverTitleFont = tn.NormalTitleFont;
	tn.SetBackgroundBitmap(notifyBg.Image,Color.FromArgb(255,0,255));
	tn.SetCloseBitmap(notifyClose.Image,Color.FromArgb(255,0,255),new Point(127,8));
	tn.TitleRectangle = new Rectangle(60,12,100,30);
	tn.ContentRectangle = new Rectangle(8,43,133,64);
	tn.Show("Notification", "The XMark service has started.", 250, 1500, 250);

The above code uses two ImageStore components, notifyBg and notifyClose, to store the background image and close button image respectively. The sample produces this result:

The two bitmaps stored in the ImageStore components (notifyBg and notifyClose respectively) are:

and

The close button bitmap contains three states for the close button: normal, hover, and pressed.

The notification window's size will be the size of the background bitmap, so make your background bitmap a reasonable size. Also, the close button bitmap size doesn't matter, but it should follow this form: Width=ButtonSize*3, Height=ButtonSize, where ButtonSize is any pixel size.

For more details on the TaskbarNotifier, please refer to the NetXP reference documentation.