Click here to Skip to main content
15,896,154 members
Articles / Desktop Programming / MFC
Article

Add a baloon type tooltip message for your form

Rate me:
Please Sign up or sign in to vote.
1.13/5 (22 votes)
18 Apr 20041 min read 64K   1.4K   20   2
This example demonstrates how can you make a baloon tooltip message using windows tooltip component.

Sample Image - ToolTip.jpg

Introduction

The following example demonstrate how to make a baloon tooltip hint message using "ToolTip" component.

About Windows ToolTip component

The Windows Forms ToolTip component displays text when the user mouse over a control on the form. You can associate the ToolTip control with any other control. You have to place the ToolTip control on your form for setting the properties such as Delay, Animation, Fading etc.  Tooltip will help you to save the space in form to show messages as well as a small description of the particular control or item you want to show details.

A ToolTip component provides a ToolTip property to multiple controls on a Windows Form or other container. At the same time, you can inherit all the properties of the same control any of your form.  That means you can dynamatically change the properties, tooltip style , color on your different forms or controls, based on your choice.

Methods of the ToolTip Component

There are two key methods are used in the ToolTip component.  They are

  SetToolTip, which you can use to get the ToolTips displayed for controls and

  GetToolTip, can use to set the ToolTips displayed for controls.

Setting a tooltip

 ' In this example, Text1 is the control to display the ToolTip.
ToolTip1.SetToolTip(Text1, "To display employee name")

Sample Program

A simple sample program attached herewith demonstrates to display baloon type popup tooltips over link labels such as Code project.com, Microsoft.com.

ToolTip Screen shot1

Sample screenshot 2

If any other issues, or comments, let me know.

thank you and have a wonderful day!

Benoyraj

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


Written By
United States United States
Binoy is a software developer of Information Technology Division in Memphis,TN.

Comments and Discussions

 
GeneralThanks for sharing Pin
AbbasHere21-May-08 13:03
AbbasHere21-May-08 13:03 
GeneralA few words Pin
juanchosc19-Apr-04 8:57
sussjuanchosc19-Apr-04 8:57 

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.