Click to See Complete Forum and Search --> : Simple ToolTip ActiveX implementation
b_eastla
July 30th, 2001, 09:38 AM
I'm new to VB, and have just been looking into ActiveX controls. I was wondering if someone could give me a link, or some quick code as to how to implement ToolTips for an ActiveX control. If there is something very simple, and to the point that could show me this, that would be great.
Thanks for any help :o)
CrownMaker
August 2nd, 2001, 05:57 PM
I'm not sure of which version of VB you are using but in VB 6.0 you simply enter text into the ToolTipText property of each control. If you are using an earlier version then you have to write code using a picture box with a label in it and a timer control. You set the label AutoSize property to true then size the picture box to the label. Use the tag property of each control to hold the tooltiptext, then send this to the label caption for each control in the mousemove event. e.g.: “label1.caption = Command1.tag” then when you move out of the mousemove event, do this, label1.caption = "" and make the picturebox invisible, in the UserControl mousemove event. Use the timer to time how long the picturebox and label stay visible resetting the timer each time it’s over another control. It is a little tedious but it works. Any further questions e-mail crownmaker@hotmail.com
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.