Important alert: (current site time 7/16/2013 3:42:35 AM EDT)
 

winzip icon

Multi Line Tooltips

Email
Submitted on: 5/9/2000 10:12:26 AM
By: Gordon Robinson 
Level: Advanced
User Rating: By 16 Users
Compatibility: VB 5.0, VB 6.0
Views: 28677
 
     Are you fed up with the fact that you can only display one line in vb tooltips. This class allows multiple line tooltips. It also allows you to specify the Maximum Width of the tooltip, the delay until it appears, the length of time it is visible and whether the tooltip is centered below the control. I have added support for setting the font that is used as well.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
5/9/2000 2:38:41 PMKenman

Excellent work. I will be using this class for the rest of my natural vb programming life - or until MS splits - whichever comes first. :) Nice job!
(If this comment was disrespectful, please report it.)

 
5/9/2000 4:10:28 PMsiph0n

great example, very easy to use.
(If this comment was disrespectful, please report it.)

 
5/10/2000 3:50:00 AMviztopiaman

Very impressive and easy to implement!
(If this comment was disrespectful, please report it.)

 
5/10/2000 9:06:14 AMGordon Robinson

I have added a MaxWidth Property to this class to allow users to be able to specify the Maximum width of the tooltip in pixels. A CenterTip parameter has also been added to the AddControl method which will center the tooltip below the control. The sample code has been updated to demonstrate these changes.
(If this comment was disrespectful, please report it.)

 
5/10/2000 9:43:30 AMGordon Robinson

Me Again !! I have added VisibleTime and DelayTime properties to allow users to specify how long the tooltip is visible for and how long it takes to appear.
(If this comment was disrespectful, please report it.)

 
6/12/2000 8:42:57 AMTito

I'm looking for a way to change the font of a tooltip window using some sort of sendmessage command (not sure which api function) anyone out there know? - tristan@twcny.rr.com
(If this comment was disrespectful, please report it.)

 
6/13/2000 7:51:23 PMJohn Brandon

Been looking for something like this for some time. Great work! However, I have not been able to use for Label.ToolTips. If I am doing something wrong, please let me know. Thanks again and keep up the good work.
(If this comment was disrespectful, please report it.)

 
6/21/2000 5:23:19 AMGordon Robinson

Thanks to Arkadiy Olovyannikov for pointing that this code only worked in the IDE. I have added a call to InitCommonControls in the class_initialise event to fix this problem.
(If this comment was disrespectful, please report it.)

 
6/21/2000 8:52:09 AMSpoogeMonkey

This is great! I've been looking for this for a LONG time. Any idea how to change the font?
(If this comment was disrespectful, please report it.)

 
6/21/2000 9:41:26 AMGordon Robinson

I have added a property which allows users to specify the font that is to be used in the tooltips.
(If this comment was disrespectful, please report it.)

 
6/22/2000 11:41:01 PMTito

I sent a version of this tooltip class with some modifications to gordon, if he doesn't post it and anyone wants it from me, just email me. it includes everything his has, and also more time editing, and forecolor/backcolor/tooltip text changing.. HUGE thanks to gordon for showing me how to change tooltip fonts, with that. BTW the tooltip class i have has more features than i've seen any free-code ones have.. post it gordon!
(If this comment was disrespectful, please report it.)

 
3/29/2001 7:51:51 AMbillet

This is just what I needed. Has any one solved Tool Tips for labels or combo boxes ?
(If this comment was disrespectful, please report it.)

 
8/1/2001 5:52:04 AMH

Great code
Cheers
(If this comment was disrespectful, please report it.)

 
1/30/2003 5:08:10 PM

Mr. Robinson,

This is good code. However, when I try to run it, I can't because I'm missing the Tooltiproject.dll that is unique to this code. Could you e-mail it to me? Did I miss something? My address is mellencolie@yahoo.com

Thanks for you help!!
(If this comment was disrespectful, please report it.)

 
3/6/2003 4:18:26 PM

It works pretty OK!
I've updated the code with the mods from: http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_1042369 6.html

Thanks!

(If this comment was disrespectful, please report it.)

 
3/13/2003 2:38:59 PM

This really must be great. The only problem is, VB gives me an error saying tooltiproject.dll is missing. please e-mail it to me: alex2588@hotmail.com. i really want to be able to use this code.
(If this comment was disrespectful, please report it.)

 
7/5/2003 3:50:59 PM

Great code. However, I'm missing the tooltipproject.dll.
Can someone e-mail it to me.
nickc_temp@yahoo.com
Thanks in advance.
(If this comment was disrespectful, please report it.)

 
11/18/2004 11:46:03 AM

Great job! I totally agree with everyone else. REally well done. Noticed some odd behavior in association with datagrids (multiple tooltips coming up). Outside of that, a really nice job. Thank you for sharing it.
(If this comment was disrespectful, please report it.)

 
8/27/2005 7:54:41 PMMoroco

Very simple and great work .
In your example, you show tooltip for 2 controls with diffrent messages by the same instance. I modified it to show icons, but it display the lastest icon fot the 2 tooltips .
5 globe anyway .
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.