Click here to Skip to main content
13,555,796 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 24 Sep 2012
Licenced CPOL

Customized ToolTip [for WinForms]

, 25 Mar 2013
Rate this:
Please Sign up or sign in to vote.
Customized ToolTip [for WinForms]


This is a fully customizable ToolTip that inherits from the standard one. This work was my cornerstone in this project: Therefore, I didn't want to be a 'tightwad' and decided to share the whole project with you, guys ;) 

The new features, the ability of customizing the ToolTip's:

  • Title color.
  • Title font.
  • Description color. 
  • Description font. 
  • Background image. 

How to use the component

  1. Right click on the Visual Studio ToolBox.
  2. On the ".NET Framework Components" tab click on "Browse..." button.
  3. Browse to the DLL file and select it.
  4. On the ToolBox a new component will be added with "eToolTip" name.

Now add your new component to any form and for the properties they are accessible from both: the DesignerEditor and CodeEditor as well.

 How does it work?

The component relies on the 'OnPopup' and 'OnDrawn' events to customize the ToolTip. How?

  1. OnPopup event: 
  2. Measuring the appropriate size that will fit with the both of title and description.

  3. OnDrawn event:
    • First thing here that the event will start with is resizing the specified BackgroundImage according to the ToolTip size and then drawing the background image.
    • From the measured size the event will determine the appropriate way of drawing the text according to the ToolTip measured size. 
    • When drawing a text on the ToolTip using the 'e.Graphics.DrawString()' method, this method needs a specific brush and font for the string that will be drawn, so the event is set to use the specified brush and font from the specified properties for each of Title and Description of the component.


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


About the Author

Hicham El Horri
Morocco Morocco
He is a 21 year-old student studying at Mohammed I University (in Oujda - Morocco). Born in Aklim - Berkane, Morocco.
Hates discrimination with all its kinds.
He is interested in programming on Visual Studio since 2009.
Current programming languages:
+ VBScript (for both: Windows & web).
+ JScript (for both: Windows & web).
+ Visual Basic 6.0 and higher.
+ C# 2003 and higher.
+ RealBasic.
+ Html.
+ Still learning C++.

You may also be interested in...

Comments and Discussions

Question:) Pin
Hicham El Horri26-Mar-13 1:57
memberHicham El Horri26-Mar-13 1:57 
GeneralMy vote of 1 Pin
vijayksingh25-Mar-13 18:47
membervijayksingh25-Mar-13 18:47 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02-2016 | 2.8.180515.1 | Last Updated 26 Mar 2013
Article Copyright 2012 by Hicham El Horri
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid