2011/11/07(Mon) 08:45:37 編集(投稿者)
shuさんの案でコード書いてみました。
UserControlにToolTipとボタン3つがある前提です。
Public Class UserControl1
Private _flag As Boolean = False
Private Sub Button_MouseHover(sender As System.Object, e As System.EventArgs) _
Handles Me.MouseHover, Button1.MouseHover, Button2.MouseHover, Button3.MouseHover
If (Me._flag) Then Return
Dim c As System.Windows.Forms.Control = DirectCast(sender, System.Windows.Forms.Control)
Me.ToolTip1.SetToolTip(c, "Hello World")
Me._flag = True
End Sub
Private Sub Button_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) _
Handles Me.MouseMove, Button1.MouseMove, Button2.MouseMove, Button3.MouseMove
Me._flag = False
End Sub
End Class