ARTICLE

Add ToolTips to Windows Controls in VB.Net

Posted by Praveen Kumar Articles | Visual Basic 2010 November 16, 2004
Creating a ToolTip object is similar to any other .NET class object. You call Constructor to create a tooltip object.
 
Reader Level:

Tools Used

  • Assembly System.Winforms.dll.
  • Namespace System.Winforms. 

In .NET, the ToolTip class provides tooltip functionality for Windows Controls. Creating a ToolTip object is similar to any other .NET class object. You call Constructor to create a tooltip object.

There are two steps to add a tooltip to a control.  First you create an instance of ToolTip control using ToolTip class. And second you attach tooltip to a control by using ToolTip class's SetToolTip member and call set Active property true.

Active = true.

Say you want to add a tooltip to a button, button1.

1. Create a Tooltip Object

Private toolTip1 As ToolTip = New System.WinForms.ToolTip (Me.components)

2. Attach tooltip to the control.

Private toolTip1 As ToolTip = New System.WinForms.ToolTip (Me.components)
toolTip1.SetToolTip (button1, "This is tooltip test")
toolTip1.Active =
True

share this article :
post comment
 

Hi.Can you let me know how to use tooltip function for a menu and submenus?

Posted by Srikanth G Oct 27, 2010

Can we have a tool tip which displays the etxt in hindi.(C# .net)

Posted by Rahul Pandey Sep 05, 2007
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
MOST LIKED ARTICLE
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor