Display Tooltips

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:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes