Visual Basic Development Bookmark and Share   
 Home > Visual Basic Power Packs > Tooltips
 

Tooltips

How do I popup tooltip from a shape control?
Benny V  Tuesday, September 25, 2007 6:49 AM

You could do something like the following;

Dim tp As New ToolTip()

Private Sub OvalShape1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles OvalShape1.MouseHover

tp.Show("OvalShape tooltip", ShapeContainer1, OvalShape1.Left, OvalShape1.Top, 5000)

End Sub

Private Sub OvalShape1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles OvalShape1.MouseLeave

tp.Hide(ShapeContainer1)

End Sub

JohnHart_MSFT  Tuesday, September 25, 2007 8:43 PM

You could do something like the following;

Dim tp As New ToolTip()

Private Sub OvalShape1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles OvalShape1.MouseHover

tp.Show("OvalShape tooltip", ShapeContainer1, OvalShape1.Left, OvalShape1.Top, 5000)

End Sub

Private Sub OvalShape1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles OvalShape1.MouseLeave

tp.Hide(ShapeContainer1)

End Sub

JohnHart_MSFT  Tuesday, September 25, 2007 8:43 PM
You can use also:

ToolTip1.SetToolTip(Me.ShapeContainer1, "hehehe oval shape!")

where:
    Me.ShapeContainer1 = New Microsoft.VisualBasic.PowerPacks.ShapeContainer
    Me.OvalShape1 = New Microsoft.VisualBasic.PowerPacks.OvalShape

Best regards, Sergiu
Sergiu Dudnic  Wednesday, October 14, 2009 2:52 PM

You can use google to search for other answers

Custom Search

More Threads

• can't register Microsoft.InteropFormTools.dll
• Scrollable ... Won't
• DataRepeater format content of TextBox or Lable
• Printing a report
• PrintForm and pagesetupdialog
• Printer Compatibility Library
• VB2008 DataRepeater control places fields off vertical screen limit in form designer
• Set Document Name?
• How to give link to MS excel file from Visual Basic 6.0 Edition
• Why am I not able to clear datarepeater?