articles

Home / DeveloperSection / Articles / The ToolTip Control in VB.Net

The ToolTip Control in VB.Net

The ToolTip Control in VB.Net

Pushpendra Singh 33946 13-Dec-2010

The ToolTip Control in VB.Net

The ToolTip control is used to display some text when the mouse is move over a control. This control is helpful in providing quick information when the user moves the pointer over an associated control.

How to use ToolTip control

Drag and drop a Tooltip control and control on which you want to use tooltip control

The ToolTip Control in VB.Net

The ToolTip Control in VB.Net

Code:

Public Class Form18
    Private Sub Button1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.MouseHover
        'show tooltip on button
        ToolTip1.SetToolTip(Button1, "Click  to show time")
     ' SetToolTip method assign a ToolTip with control
    End Sub
End Class

 

Run the project

The ToolTip Control in VB.Net

When mouse move over the Time button then MouseHover event will fire and  tooltip text will show.

The ToolTip Control in VB.Net

ToolTip properties

Active - set the tooltip status, by default it set to true set false to hide the tooltip.

ToolTipIcon -set the icon that will show on the tooltip.

Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'set the tooltip icon
        ToolTip1.ToolTipIcon = ToolTipIcon.Info
End Sub


The ToolTip Control in VB.Net

IsBalloon:  when IsBalloon property is true then tooltip will display as a balloon.

Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'tooltip show as baloon
        ToolTip1.IsBalloon = True
 End Sub


The ToolTip Control in VB.Net

 

 


Updated 04-Mar-2020

Leave Comment

Comments

Liked By