Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

ToolTip with Date info

I wanna display current system Date and/or Time in a ToolTip whenever I hover mouse on any control as desired.
Is it possible? :confused:
[147 byte] By [naikosen] at [2007-11-11 10:28:02]
# 1 Re: ToolTip with Date info
Sure. Just create a function to set the control's ToolTipText property to the current date/time:

Private Sub SetToolTipToDate(ctl As Control)
ctl.ToolTipText = Format(Now, "General Date")
End Sub

Then call that function from any control's MouseMove event:

Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Call SetToolTipToDate(Text1)
End Sub
Phil Weber at 2007-11-11 17:22:40 >
# 2 Re: ToolTip with Date info
Thank you very much Phil
naikosen at 2007-11-11 17:23:40 >