Click here to Skip to main content
Click here to Skip to main content

An Office 2003-like popup notifier

By , 23 Mar 2006
 

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 :)

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)

About the Author

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

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 5memberdipan chikani15 Sep '12 - 2:23 
NewsNew Version of this Control with many Bugs fixed (Link inside)memberSimon B.3 Nov '11 - 4:54 
Questioncontrols propertymembersergio5822 Jul '11 - 4:08 
GeneralShowing multiple popups at the same time.memberkdlc19 Jan '09 - 7:56 
GeneralUnable to close the popup with the close button!!!memberharvindersingh1151 Oct '08 - 3:04 
GeneralRe: Unable to close the popup with the close button!!!memberedzjx13 Feb '10 - 8:49 
GeneralRe: Unable to close the popup with the close button!!!memberjamslove16 Aug '10 - 4:29 
GeneralRe: Unable to close the popup with the close button!!!membernikoskritikos30 Aug '10 - 5:47 
QuestionHow to use this in a project C#memberharvindersingh11529 Sep '08 - 3:22 
AnswerRe: How to use this in a project C#memberharvindersingh1151 Oct '08 - 4:03 
GeneralRe: How to use this in a project C#memberlasai27 Jan '10 - 15:48 
GeneralExcellent Work...........memberMember 401738119 Aug '08 - 6:14 
GeneralFrom right to left ordermemberammsamm22 Oct '07 - 0:40 
GeneralNew version anyonememberNick Waelti25 Aug '07 - 23:21 
GeneralRe: New version anyone - I'd be gladmembersemmel7110 Oct '07 - 8:04 
GeneralRe: New version anyonememberMember 131532023 Dec '07 - 6:22 
JokeRe: New version anyonemembergaryjohn_200031 Dec '07 - 6:06 
NewsUnused Codememberpablleaf21 Jun '07 - 12:07 
NewsRedundant Line of Codememberpablleaf21 Jun '07 - 10:38 
GeneralSmall DoubtmemberGayuDams26 Apr '07 - 2:05 
GeneralOpacity Problem with multiple stacking popupsmemberfperugini22 Mar '07 - 10:18 
AnswerRe: Opacity Problem with multiple stacking popupsmemberfperugini23 Mar '07 - 4:33 
QuestionRe: Opacity Problem with multiple stacking popupsmemberStyxke5 Apr '07 - 20:27 
AnswerRe: Opacity Problem with multiple stacking popupsmemberfperugini13 Apr '07 - 7:16 
GeneralMultiple Highlight Linesmemberb00tleg22 Mar '07 - 9:38 

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

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 23 Mar 2006
Article Copyright 2006 by Nicolas Wälti
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid