ToolTip 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 a control on which you want to used tooltip control

ToolTip Control in VB.Net

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

ToolTip Control in VB.Net

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

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


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


ToolTip Control in VB.Net

 

 

  Modified On Mar-22-2018 07:16:31 AM

Leave Comment