I have a vb.net 2005 app I am creating, I also have a separate user control
that I have created separate from the app.
On the control I have:
Namespace HLMultiSelect.F orms.Controls
Public Class HLMultiSelect
Inherits System.Windows. Forms.Control
Public Event ReportMouseStat us(ByVal bStatus As Boolean)
Private Sub HLSelectButton_ MouseEnter(ByVa l sender As Object, ByVal
e As System.EventArg s) Handles Me.MouseEnter
mMouseHover = True
Invalidate()
RaiseEvent ReportMouseStat us(True)
End Sub
Private Sub HLSelectButton_ MouseLeave(ByVa l sender As Object, ByVal
e As System.EventArg s) Handles Me.MouseLeave
mMouseHover = False
Invalidate()
RaiseEvent ReportMouseStat us(False)
End Sub
End Class
End Namespace
On the app that I am creating I have:
Imports HLMultiSelect.F orms.Controls
Public Class Form1
Public WithEvents sMouse As New HLMultiSelect
Private Sub sMouse_ReportMo useStatus(ByVal bStatus As Boolean) Handles
sMouse.ReportMo useStatus
MsgBox("hello")
End Sub
Id does not fire, am I missing something?
The only thing that calls the event is when the user puts the mouse over the
control.
Comment