Click here to Skip to main content
11,932,446 members (51,762 online)
Click here to Skip to main content
Add your own
alternative version


56 bookmarked

Adding "Balloon" style to ToolTip provider

, 29 Apr 2005
Rate this:
Please Sign up or sign in to vote.
Adding "Balloon" style to ToolTip provider.

Sample Image - Balloon_ToolTip.jpg Red Balloon toolTip


There are a lot of articles about "balloon" Tooltip, many lines of codes written with classes which solved the problem. Here I show yet another solution which I think is the most easiest and does not influence existing System.Windows.Forms.ToolTip implementation.


Probably you may know, reflection is a big advantage in .NET Framework, and I think will use it this time also. System.Windows.Forms.ToolTip class holds handle to the native tooltip window. This handle is non public, so we need to use reflection to get this member. Then we can change the style of the window to "balloon".


Need to call function SetBalloonStyle from place where the ToolTip window handle is created. In my example, I do it in OnLoad of the Form. If you call the function with handle which is not valid, exception will be thrown.

protected override void OnLoad(EventArgs e)
  base.OnLoad (e);  
  // set toolTip native window style to "balloon".
  NativeMethods.SetBalloonStyle ( toolTip1 );

Final Notes

Same approach can be used in many places, like the example in System.Windows.Forms.PropertyGrid to make it flat.


  • 02/05/05

    Added SetBackColor function, showing how you can change the color of the tooltip window.


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


About the Author

Mihail Stefanov
United States United States

You may also be interested in...

Comments and Discussions

QuestionNice work Pin
Mike Hankey18-Aug-14 7:18
professionalMike Hankey18-Aug-14 7:18 
Generalgood work Pin
amin keshani4-Nov-06 22:45
memberamin keshani4-Nov-06 22:45 
Generalc# .net 2005 error Pin
radnix15-Apr-06 6:36
memberradnix15-Apr-06 6:36 
GeneralRe: c# .net 2005 error Pin
Mihail Stefanov15-Apr-06 11:38
memberMihail Stefanov15-Apr-06 11:38 
You can use new ToolTip.BackColor and ToolTip.IsBallon properties.

GeneralRe: c# .net 2005 error Pin
bhupinders14-Mar-07 21:59
memberbhupinders14-Mar-07 21:59 
QuestionRight to Left Balloon Pin
AmirSasan30-Oct-05 11:53
memberAmirSasan30-Oct-05 11:53 
AnswerRe: Right to Left Balloon Pin
Mihail Stefanov2-Nov-05 11:47
memberMihail Stefanov2-Nov-05 11:47 
GeneralRe: Right to Left Balloon Pin
AmirSasan3-Nov-05 11:52
memberAmirSasan3-Nov-05 11:52 
Generalgood idea Pin
Neil Yao27-Oct-05 21:25
memberNeil Yao27-Oct-05 21:25 
GeneralRe: good idea Pin
Mihail Stefanov27-Oct-05 21:30
memberMihail Stefanov27-Oct-05 21:30 
GeneralCustom balloon content Pin
WillemM5-Jul-05 1:01
memberWillemM5-Jul-05 1:01 
GeneralRe: Custom balloon content Pin
Mihail Stefanov5-Jul-05 2:18
memberMihail Stefanov5-Jul-05 2:18 
GeneralAny news? Pin
_JERKER_17-Oct-05 23:42
member_JERKER_17-Oct-05 23:42 
GeneralRe: Any news? Pin
Mihail Stefanov27-Oct-05 21:29
memberMihail Stefanov27-Oct-05 21:29 
GeneralRe: Custom balloon content Pin
Mihail Stefanov2-Nov-05 11:44
memberMihail Stefanov2-Nov-05 11:44 
GeneralAwesome! Pin
Nick Z.5-May-05 8:46
memberNick Z.5-May-05 8:46 
GeneralRe: Awesome! Pin
RichNFamous19-May-05 1:02
memberRichNFamous19-May-05 1:02 
GeneralGood job! Pin
HyperX2-May-05 8:43
memberHyperX2-May-05 8:43 
GeneralRe: Good job! Pin
Mihail Stefanov2-May-05 10:02
memberMihail Stefanov2-May-05 10:02 
GeneralRe: Good job! Pin
HyperX2-May-05 12:12
memberHyperX2-May-05 12:12 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.151126.1 | Last Updated 29 Apr 2005
Article Copyright 2005 by Mihail Stefanov
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid