VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 7

Adding ToolTips to an Application

A fast and simple way of adding Help information to an application without using a Help file is by providing ToolTips to the users.

ToolTips, which are becoming more and more common in Windows applications, are little bits of information that appear when the user rests the mouse pointer over an object in a window. Visual Basic 6 is a good example of an application that provides ToolTips. If you rest the mouse pointer over a button on the toolbar or a control in the toolbox, a message identifying the purpose of the object appears. You can also easily implement such ToolTip Help in your own project. Figure 7.4 shows an example of ToolTip Help in a VB application.

An example of ToolTips in Visual Basic 6
FIGURE 7.4 An example of ToolTips in Visual Basic 6.

Adding ToolTips to an application is easy in Visual Basic. Just set the ToolTipText property of each control to the text you want displayed when the mouse pointer is over that control.

If an application performs calculations and displays results in a Label control, for example, you might want to explain to the user how the result was determined. This can be done by putting the formula used in the calculation into the ToolTipText property of the Label control. When the user rests the pointer over the Label, the formula will appear.

You may also want to add ToolTips to command buttons to identify the purpose of each button to the user. Instead of placing large amounts of descriptive text in the Caption of a CommandButton, you can provide additional help to the user through ToolTips. By doing this the captions of the buttons are kept simple and, after the user is familiar with the functionality of a button, that user will no longer need to use the ToolTips.

If an application has ToolTips in a ToolBar or a TabStrip control, the ShowTips property of these controls must be set to True for the tips to appear at runtime. Controls that do not have a visible interface at runtime, such as the Timer or CommonDialog controls, do not have a ToolTipText property.


<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved