' Create an instance of our Tooltip class
Set TTip = New clsToolTip
' We must SetFocus to any control that can
' accept the focus in order to force Access to
' create the inplace editing Window.
Me.txtCompanyName.SetFocus
With TTip
' Creat the tooltip window
Call .Create(Me)
' Set the tooltip window to show for 5 secs
.DelayTime = 5000
.SetToolTipTitle "CUSTOM TOOLTIPS", 0
' ToolTip text colors
.ForeColor = vbBlue
.BackColor = RGB(192, 192, 192)
' Set the text for the Notes label.
.SetToolText Me.Lablel_Notes, "I am the Notes Label." & vbCrLf & "This is the second line!"
'Lablel_Notes==控件名
'“ ”内为现实内容!
End With
' Fill in our NOTES unbound TextBox
Me.txtNotes = "Move your Mouse over the any of the controls to see the Custom Tooltips." & vbCrLf
Me.txtNotes = Me.txtNotes & "Try moving the Mouse over the ListBox." & vbCrLf
Me.txtNotes = Me.txtNotes & "This works even if the ListBox does not have the focus!"