Click here to Skip to main content
Click here to Skip to main content
Go to top

An Office 2003-like popup notifier

, 23 Mar 2006
Rate this:
Please Sign up or sign in to vote.
A nice little control to help the user notice you're trying to tell him something...

Introduction

This is a simple project, a control that mimics the Microsoft® Outlook® 2003 mail alert.

Features

This control has several features. Among them, you'll find:

Progressive appearance - transparency

MSN Messenger like pop-ups (any size, color, etc.)

Another sample

This control is 100% drawn in the code, there is absolutely no other dependencies than System.Drawing and System.Windows.Forms.

You can include a ContextMenuStrip when clicking on the "down arrow" button.

Using the code

The controls is made of two basic classes:

  • A form (the part that will actually show up).
  • A class that contains all the properties that will be includable on forms.

The class contains two timers, one used for the appearing/disappearing animation, the other (configurable) is used to define how much time the popup is shown before it disappears.

This is how the form is actually shown:

fPopup.Size = Size
fPopup.Opacity = 0
fPopup.Location = _
  New Point(Screen.PrimaryScreen.WorkingArea.Right_
   - fPopup.Size.Width - 1, _
   Screen.PrimaryScreen.WorkingArea.Bottom)
fPopup.Show()

The form is does the drawing in the Paint event.

I'm using these functions to obtain a color that is similar but lighter/darker. There might exist another method.

Private Function GetDarkerColor(ByVal Color As Color) As Color
    Dim clNew As Color
    clNew = Drawing.Color.FromArgb(255, DedValueMin0(CInt(Color.R), _
            Parent.GradientPower), DedValueMin0(CInt(Color.G), _
            Parent.GradientPower), DedValueMin0(CInt(Color.B), _
            Parent.GradientPower))
    Return clNew
End Function

And to avoid flickering...

Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
Me.SetStyle(ControlStyles.ResizeRedraw, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)

Points of Interest

None really, it's nice, it's fun, it's colorful... that's it Smile | :)

History

  • March 2006 - V 1.0.

License

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

Share

About the Author

Nicolas Wälti
Software Developer (Senior)
Switzerland Switzerland
No Biography provided

Comments and Discussions

 
GeneralMultiple Highlight Lines Pinmemberb00tleg22-Mar-07 9:38 
AnswerRe: Multiple Highlight Lines PinmemberNick Waelti22-Mar-07 22:34 
GeneralRe: Multiple Highlight Lines Pinmemberb00tleg23-Mar-07 7:04 
GeneralRe: Multiple Highlight Lines PinmemberHoney Arora23-May-07 19:29 
GeneralC# version PinmemberAmbili_T21-Mar-07 22:23 
AnswerRe: C# version PinmemberLittleWhiteDog22-Mar-07 21:33 
QuestionHowto move the popup with the grip? PinmemberLittleWhiteDog14-Mar-07 5:32 
AnswerRe: Howto move the popup with the grip? PinmemberNick Waelti15-Mar-07 2:42 
QuestionRe: Howto move the popup with the grip? [modified] PinmemberLittleWhiteDog21-Mar-07 5:20 
QuestionExtract the image PinmemberLittleWhiteDog13-Mar-07 22:54 
AnswerRe: Extract the image PinmemberNick Waelti15-Mar-07 2:41 
NewsRe: Extract the image [modified] PinmemberLittleWhiteDog15-Mar-07 23:22 
Questionediting the dll file?!? Pinmemberthebirdman19849-Mar-07 1:45 
AnswerRe: editing the dll file?!? Pinmemberthebirdman19849-Mar-07 3:35 
AnswerRe: editing the dll file?!? PinmemberNick Waelti15-Mar-07 2:39 
GeneralThe popup only fires in form load. Pinmemberastanton197821-Feb-07 2:06 
GeneralRe: The popup only fires in form load. Pinmemberastanton197821-Feb-07 4:05 
GeneralPort code to VS .NET Pinmemberutstudent26-Jan-07 16:37 
GeneralRe: Port code to VS .NET Pinmemberwaltersenekal19-Feb-07 3:51 
GeneralRe: Port code to VS .NET Pinmemberutstudent19-Feb-07 14:44 
QuestionYes No Replies Pinmemberdavidswift12-Jan-07 4:28 
AnswerRe: Yes No Replies PinmemberNick Wälti15-Jan-07 19:57 
QuestionUse in Threads PinmemberK32127-Nov-06 11:57 
GeneralAvoid losing focus when popup appears Pinmembercalis online15-Oct-06 23:12 
QuestionRe: Avoid losing focus when popup appears Pinmembercalis online30-Oct-06 20:05 
AnswerRe: Avoid losing focus when popup appears Pinmemberddino11-Nov-06 23:52 
GeneralRe: Avoid losing focus when popup appears Pinmembercalis online14-Nov-06 4:32 
GeneralRe: Avoid losing focus when popup appears [modified] PinmemberGavinator123415-Nov-06 18:08 
GeneralRe: Avoid losing focus when popup appears Pinmembercalis online12-Dec-06 9:36 
GeneralRe: Avoid losing focus when popup appears [modified] PinmemberBrett Meyerowitz18-Dec-06 6:14 
GeneralRe: Avoid losing focus when popup appears Pinmemberlsri808814-Oct-07 23:47 
GeneralMSN-like stackable popup - OnClick Pinmembercalis online28-Sep-06 22:19 
AnswerRe: MSN-like stackable popup - OnClick PinmemberNick Wälti28-Sep-06 23:05 
GeneralRe: MSN-like stackable popup - OnClick Pinmembercalis online28-Sep-06 23:25 
GeneralPopup Notifier minor issue Pinmemberbrembot17-Sep-06 17:19 
AnswerRe: Popup Notifier minor issue PinmemberNick Wälti28-Sep-06 23:07 
QuestionHow ? Pinmemberzimmwarrior15-Sep-06 1:11 
QuestionThreadSafe? Pinmemberbrembot1-Aug-06 15:46 
Generalgrow and shrink notifier Pinmemberposis6-Jul-06 2:02 
GeneralRe: grow and shrink notifier PinmemberNick Wälti29-Jul-06 6:37 
QuestionCan the notifier be shown in at the top of the screen? Pinmemberflyte5-Jun-06 11:29 
AnswerRe: Can the notifier be shown in at the top of the screen? PinmemberNick Wälti5-Jun-06 21:51 
GeneralType PopupNotifier is not defined PinmemberUntouchab1e29-May-06 10:24 
AnswerRe: Type PopupNotifier is not defined PinmemberNick Wälti29-May-06 21:58 
GeneralRe: Type PopupNotifier is not defined PinmemberUntouchab1e30-May-06 4:22 
GeneralRe: Type PopupNotifier is not defined Pinmemberssamayoa1-Jul-06 7:27 
GeneralVB.NET 2003 Pinmembermadval17-May-06 10:40 
GeneralRe: VB.NET 2003 PinmemberUntouchab1e28-May-06 9:16 
AnswerRe: VB.NET 2003 PinmemberNick Wälti28-May-06 21:27 
GeneralRe: VB.NET 2003 PinmemberANameNotRegistered14-Dec-06 2:39 

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

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

| Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 23 Mar 2006
Article Copyright 2006 by Nicolas Wälti
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid