Click here to Skip to main content
11,415,390 members (85,110 online)
Click here to Skip to main content

Balloon Tips Galore!

, 14 Sep 2003
Rate this:
Please Sign up or sign in to vote.
An article describing the various forms of Balloon Tips

Introduction

This article introduces creating Balloon Tooltips, using available standard APIs. Balloon Tooltips can be very useful sometimes, however if used improperly can be painful for the user. Simply put, the code creates different types of balloon Tooltips. To use this, download the code, and choose the class you want to add in your project. Copy it over to your solution and you are ready to go. Have a look at the code behind the forms (Form1, Form2, Form3) in order to use it. The aim here was to keep the code as simple and modular as possible.

There are quite a few excellent articles on Code Project explaining how to create BalloonTips. Some even create them from scratch and are probably more feature rich. While I found these articles very informative, I also felt the need to use the original tips which come with Windows XP. The result is this simple API based project. Most of the code is based on this MSDN article.

I have omitted a notification kind of Tooltip or a Task Tray kind of balloon tip, just because there is already a good example on Code Project.

Using the code

All classes contain explanatory doc comments where necessary. Also code has been provided in both VB and C# to help ease of usage. The solution has been created in VS. NET 2003, hence may not be usable from VS. NET 2002, However the source code shouldn't be a problem.

HoverBalloon: Instead of showing a Tooltip over a control, a balloon tip can be shown over the control. Use this in cases where you want to attract the user's attention to detail. Use this sparingly in your application, so that user doesn't end up seeing a festival of balloons scattered over the form.

MessageBalloon: Has more control over the display of the balloon. The stem, location of the balloon can be changed with this class. This can be shown and hidden at will. Use this whenever you need a non-modal message box.

EditBalloon: Notice how a balloon comes up while entering the password in a edit control, if the CAPS lock is pressed accidentally ? It just reminds the user, but doesn't stop the process. Use this class as a reminder to the user while entering key edit fields.

If using VS. NET 2002 then a manifest file needs to be added to the directory in which the binary resides. (Find one in the 'bin' directory of download). If using VS. NET 2003 then Application.EnableVisualStyles() needs to be called before any form is loaded.

Enjoy the code, any feedback is appreciated.

Points

If the user has disabled BalloonTips in the registry then this probably wont work. This hasn't been tested on operating systems other than XP, so probably it won't work there.

Future Improvements

Provide designer support similar to the Tooltip control, by deriving from System.ComponentModel.Component class, similar to the System.Windows.Forms.ToolTip class at design time.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Ramesh Shrivastav
Web Developer
United States United States
Ramesh is very much into Microsoft technologies, and silently marvels at the power of Windows SDK.
He juggles his time between his family, work and his computer.

Comments and Discussions

 
Question[Resolved] How to move the Balloon with the form? [modified] Pin
Olivier1757857857804-Feb-14 4:44
memberOlivier1757857857804-Feb-14 4:44 
QuestionLicence Pin
Dommett16-May-13 1:01
memberDommett16-May-13 1:01 
QuestionIt is getting crashed everytime on startup of the program in win7 Pin
gaurish thakkar18-Jan-13 1:58
membergaurish thakkar18-Jan-13 1:58 
QuestionRightToLeft Support Pin
cearsh11-May-12 22:47
membercearsh11-May-12 22:47 
GeneralMy vote of 5 Pin
manoj kumar choubey23-Mar-12 5:01
membermanoj kumar choubey23-Mar-12 5:01 
GeneralMy vote of 5 Pin
jtxd5-May-11 23:05
memberjtxd5-May-11 23:05 
GeneralMy vote of 5 Pin
raiserle7-Apr-11 10:39
memberraiserle7-Apr-11 10:39 
QuestionHow to show the balloon tooltip using the TTM_POPUP message Pin
feg200027-Aug-10 11:17
memberfeg200027-Aug-10 11:17 
Questionhow to disable windows' balloon Pin
HZ216-Dec-09 3:43
memberHZ216-Dec-09 3:43 
GeneralCrash on Windows 7 (64bit) Pin
Member 344021116-Dec-09 1:47
memberMember 344021116-Dec-09 1:47 
AnswerRe: Crash on Windows 7 (64bit) Pin
HZ216-Dec-09 3:54
memberHZ216-Dec-09 3:54 
GeneralRe: Crash on Windows 7 (64bit) Pin
Alex Casamassima8-Jan-10 5:09
memberAlex Casamassima8-Jan-10 5:09 
GeneralRe: Crash on Windows 7 (64bit) Pin
Himal1619813-Jun-10 6:36
memberHimal1619813-Jun-10 6:36 
GeneralAnother Thanks Pin
Gary Huckabone8-Dec-09 10:37
memberGary Huckabone8-Dec-09 10:37 
GeneralThanks Pin
oldsellerros30-Nov-09 4:30
memberoldsellerros30-Nov-09 4:30 
Generalensure message balloon dies when window changes or closes Pin
BobishKindaGuy9-Apr-09 12:53
memberBobishKindaGuy9-Apr-09 12:53 
AnswerRe: ensure message balloon dies when window changes or closes [modified] Pin
KPEBEDKO13-Aug-09 23:23
memberKPEBEDKO13-Aug-09 23:23 
GeneralHoverBalloon disappears rather quickly Pin
BobishKindaGuy4-Jan-09 1:37
memberBobishKindaGuy4-Jan-09 1:37 
GeneralRe: HoverBalloon disappears rather quickly Pin
sgennette9-Apr-09 9:54
membersgennette9-Apr-09 9:54 
GeneralRe: HoverBalloon disappears rather quickly [modified] Pin
BobishKindaGuy9-Apr-09 11:48
memberBobishKindaGuy9-Apr-09 11:48 
Thanks, sgennette,

I'm having a bit of trouble implementing your suggestion, can you show where you put the "SendMessage" call to implement this?
GeneralRe: HoverBalloon disappears rather quickly Pin
sgennette10-Apr-09 4:06
membersgennette10-Apr-09 4:06 
GeneralRe: HoverBalloon disappears rather quickly Pin
BobishKindaGuy10-Apr-09 10:15
memberBobishKindaGuy10-Apr-09 10:15 
GeneralBalloonTip Visual Stype & WPF Pin
RStern26-Aug-08 1:15
memberRStern26-Aug-08 1:15 
QuestionHow to do it for richtextbox? Pin
Priyank Bolia10-Apr-08 10:29
memberPriyank Bolia10-Apr-08 10:29 
GeneralHelp with edit tooltip Pin
rageit15-Jul-07 20:22
memberrageit15-Jul-07 20:22 
GeneralEdit ToolTip Appears and dissapears Pin
Carl Ja23-May-07 14:52
memberCarl Ja23-May-07 14:52 
GeneralRe: Edit ToolTip Appears and dissapears Pin
Carl Ja23-May-07 17:28
memberCarl Ja23-May-07 17:28 
QuestionHOW TO ADD CUSTOM ICON Pin
Nicola Costantini12-Mar-07 7:10
memberNicola Costantini12-Mar-07 7:10 
QuestionMissing feature? Pin
petemaverick11-Feb-07 9:29
memberpetemaverick11-Feb-07 9:29 
Generalballoon becomes orphan Pin
Harm Salomons25-Oct-06 8:38
memberHarm Salomons25-Oct-06 8:38 
GeneralTimeout option Pin
kikhan_2115-Jun-06 5:42
memberkikhan_2115-Jun-06 5:42 
AnswerRe: Timeout option Pin
JesusAbizanda23-Jun-06 1:35
memberJesusAbizanda23-Jun-06 1:35 
GeneralRe: Timeout option Pin
sgennette9-Apr-09 9:53
membersgennette9-Apr-09 9:53 
Questionproblem with OpenFIleDialog, SaveFileDialog and FolderBrowseDialog Pin
kikhan_2131-May-06 4:07
memberkikhan_2131-May-06 4:07 
AnswerRe: problem with OpenFIleDialog, SaveFileDialog and FolderBrowseDialog Pin
marantz11-Jul-07 0:45
membermarantz11-Jul-07 0:45 
GeneralDirectly copied from MSDN bugs and all Pin
Mach00512-May-06 14:32
memberMach00512-May-06 14:32 
GeneralRe: Directly copied from MSDN bugs and all Pin
ramshri13-May-06 12:36
memberramshri13-May-06 12:36 
GeneralAccessViolationException: Bug in FMSEditTip.cs Pin
Mach00510-May-06 14:11
memberMach00510-May-06 14:11 
GeneralRe: AccessViolationException: Bug in FMSEditTip.cs Pin
jose.mira1-Oct-08 4:44
memberjose.mira1-Oct-08 4:44 
QuestionHow can the EditBallon be hidden? Pin
Kelraad14-Feb-06 3:53
memberKelraad14-Feb-06 3:53 
AnswerRe: How can the EditBallon be hidden? Pin
Kelraad14-Feb-06 4:18
memberKelraad14-Feb-06 4:18 
QuestionHow to enable balloon on XP Pin
riscy19-Dec-05 21:23
memberriscy19-Dec-05 21:23 
AnswerRe: How to enable balloon on XP Pin
Fabio Poroli4-Jan-06 4:59
memberFabio Poroli4-Jan-06 4:59 
QuestionWhat with tray? Pin
rent0n25-Nov-05 0:00
memberrent0n25-Nov-05 0:00 
QuestionRight to Left Ballon Pin
AmirSasan10-Nov-05 11:38
memberAmirSasan10-Nov-05 11:38 
AnswerRe: Right to Left Ballon Pin
freshonlineMax4-Mar-06 19:21
memberfreshonlineMax4-Mar-06 19:21 
NewsUpdate Balloon Text Pin
belzu13-Oct-05 2:12
memberbelzu13-Oct-05 2:12 
GeneralProblems with Message Tip Pin
Terrel7-Aug-05 8:35
memberTerrel7-Aug-05 8:35 
GeneralMessageBalloon Problems Pin
Choudhry2-Jan-05 22:59
memberChoudhry2-Jan-05 22:59 
GeneralBalloon Tips with ListView control Pin
mistert00620-Oct-04 10:07
membermistert00620-Oct-04 10:07 

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 | Terms of Use | Mobile
Web04 | 2.8.150427.4 | Last Updated 15 Sep 2003
Article Copyright 2003 by Ramesh Shrivastav
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid