Click here to Skip to main content
15,844,903 members
Articles / Programming Languages / C#

Notification Window

Rate me:
Please Sign up or sign in to vote.
4.40/5 (49 votes)
3 Nov 2011CPOL1 min read 200.4K   32.2K   120   66
A notification window that appears on the lower right part of the screen.

Introduction

This is a WinForms component that displays a notification window in the lower right part of the screen. Just like the Outlook new mail notification. There are many possibilities to customize the appearance of the notification window:

  • scroll and/or fade window in and out
  • configure the animation speed and the time the window is displayed
  • display a custom icon
  • set title and content text, font, size, and color
  • set all paddings around icon, title and content
  • optionally display a close button
  • optionally display a button which opens a context menu

Background

This control is based on the CodeProject article An Office 2003-like popup notifier by Nicolas Wälti. I fixed a lot of bugs in the original control and added even more properties for customizing the appearance of the notification window.

Using the code

Using the notification window component is very simple. Just add a reference to "NotificationWindow.dll" to your WinForms project. A new component " will appear in the toolbox. Then drag this component to an existing form.

To show the notification, simply call the "Popup" method. However, normally you want to set some properties first to customize the appearance of the notification window.

C#
popupNotifier1.TitleText = "This is the notification title";
popupNotifier1.ContentText = "This is the notification text";
popupNotifier1.Popup();

Take a look at the demo project which shows the usage of most properties!

History

  • 2011-11-02: v1 released.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Sevitec Informatik AG
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
AnswerRe: I try to add PopupNotifierCollection into the project but it's not working it show only item 2 Pin
dev_prog1-Oct-14 10:43
dev_prog1-Oct-14 10:43 
QuestionSteals focus - but that can be fixed Pin
RenniePet9-Aug-14 18:14
RenniePet9-Aug-14 18:14 
AnswerRe: Steals focus - but that can be fixed Pin
hsurana29-Jan-22 10:44
hsurana29-Jan-22 10:44 
GeneralExcellent Post.. Thanks a lot! Pin
mohd_muneer7-Jul-14 0:39
mohd_muneer7-Jul-14 0:39 
GeneralNicely done Pin
karenpayne11-Apr-14 4:26
karenpayne11-Apr-14 4:26 
QuestionNotificationWindow.dll on Windows 8.1 Pin
bilgen7-Feb-14 2:37
bilgen7-Feb-14 2:37 
AnswerRe: NotificationWindow.dll on Windows 8.1 Pin
dreamgarden2-Apr-14 23:42
dreamgarden2-Apr-14 23:42 
GeneralMy vote of 5 Pin
Debopam Pal26-Nov-13 6:48
professionalDebopam Pal26-Nov-13 6:48 
This is not like an Article according to contents. It is like Tips/Tricks. Nice Tips...
QuestionBackground Image Pin
mcheschm16-Oct-13 15:31
mcheschm16-Oct-13 15:31 
GeneralMy vote of 3 Pin
bloo2k30-Sep-13 18:34
bloo2k30-Sep-13 18:34 
GeneralRe: My vote of 3 - it can be fixed Pin
RenniePet9-Aug-14 18:07
RenniePet9-Aug-14 18:07 
QuestionHow do you miniize the windows? Pin
Jacques.Williams31-Aug-13 0:49
Jacques.Williams31-Aug-13 0:49 
QuestionWhat about resize the window for longer messages? Pin
seba02011-Aug-13 22:06
seba02011-Aug-13 22:06 
BugProblem in notifier Pin
Ganesh999911-Jun-13 2:10
Ganesh999911-Jun-13 2:10 
SuggestionMultipe notifications Pin
ginge600018-Apr-13 8:26
ginge600018-Apr-13 8:26 
GeneralRe: Multipe notifications Pin
dreamgarden2-Apr-14 23:37
dreamgarden2-Apr-14 23:37 
GeneralRe: Multipe notifications Pin
Member 103386851-Jul-14 10:59
Member 103386851-Jul-14 10:59 
GeneralMy vote of 5 Pin
Member 99673255-Apr-13 5:00
Member 99673255-Apr-13 5:00 
GeneralMy vote of 5 Pin
Zephyk25-Mar-13 8:33
Zephyk25-Mar-13 8:33 
Questionmultiple windows display Pin
Member 412115015-Nov-12 5:59
Member 412115015-Nov-12 5:59 
GeneralMy vote of 5 Pin
Joezer BH7-Nov-12 19:15
professionalJoezer BH7-Nov-12 19:15 
QuestionIs this possible in web form? Pin
migsyandoc18-Oct-12 21:23
migsyandoc18-Oct-12 21:23 
QuestionWorks great! Question: Pin
Member 938870030-Aug-12 10:07
Member 938870030-Aug-12 10:07 
QuestionCan't quite get this to work. Pin
Member 835601925-Aug-12 9:12
Member 835601925-Aug-12 9:12 
GeneralThanks Pin
55Cooper5527-May-12 5:11
55Cooper5527-May-12 5:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.