C
CSharp
C++
Java
Visual Basic
HTML - CSS
Android
Asp
Asp.Net
Php
Python
JavaScript
SQL
XML
Assembly
ActiveX
API
Code Snippets
Database
Files Directories Drives
Forms
Graphics Games
Multimedia
Strings
Windows and Controls
More...
Visual Basic > Windows and Controls sample source codes
Visual Basic Code > Show tooltips on controls
Show tooltips on controls 'tooltips bij controls 'make a form with a lable called 'lbToolTip' 'make it invisible; set the background and foreground color as you wish 'put a command.control called 'cmdButton' Sub cmdButton_MouseMove(Button as Integer, shift as Integer, X as Single, Y as Single) Call ShowToolTip("commandbutton", cmdButton) End Sub Sub ShowToolTip(tekst$, X as Control) lbToolTip.Caption = tekst$ lbToolTip.Left = X.Left + (X.Width / 2) lbToolTip.Top = X.Top + X.Height + 100 lbToolTip.Visible = True End Sub 'for disaparance of the tooltip Sub Form_MouseMove(Button as Integer, shift as Integer, X as Single, Y as Single) If lbToolTip.Visible Then lbToolTip.Visible = False End Sub 'if you want you can put the same line of code in other MouseMove events Return
Privacy Policy
|
Contact
|
Advertising
|
Link to Us
|
Directory