Display Tooltips

You can easily duplicate the tooltips that appear when you float the mouse over a button in Microsoft’s products. This code displays the tooltip in the lower right-hand corner of the control (normally a button):

 ' xTip: string to display as the tip' xCtrl: control you want the tip to show for.' xTipControl: control being used to display ' the tip (an SSPanel)Public Sub ShowTip(xTip As String, xCtrl As _	Control, xTipControl As Control)	xTipControl.Left = xCtrl.Left + xCtrl.Width	xTipControl.Top = xCtrl.Top + xCtrl.Height	xTipControl.Caption = xTip	xTipControl.Visible = TrueEnd Sub

This code hides the tooltip:

 ' xTipControl : control which is being used to ' display the tip.Public Sub HideTip(xTipControl As Control)	xTipControl.Visible = FalseEnd Sub

Place the ShowTip function in the MouseMove event of the control(s) for which you want to display a tip. Place the HideTip function in the other control(s) for which you don’t want to display a tip:

 Sub Command1_MouseMove (Button As Integer, _	Shift As Integer, X As Single, Y As Single)	ShowTip "Command1", Command1, SSPanel1End SubSub Command2_MouseMove (Button As Integer, _	Shift As Integer, X As Single, Y As Single)	ShowTip "Command2", Command2, SSPanel1End SubSub Form_MouseMove (Button As Integer, _	Shift As Integer, X As Single, Y As Single)'No tooltip for form	HideTip Text1End Sub
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may