A
Andrew
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.Forms.Controls
Public Class HLMultiSelect
Inherits System.Windows.Forms.Control
Public Event ReportMouseStatus(ByVal bStatus As Boolean)
Private Sub HLSelectButton_MouseEnter(ByVal sender As Object, ByVal
e As System.EventArgs) Handles Me.MouseEnter
mMouseHover = True
Invalidate()
RaiseEvent ReportMouseStatus(True)
End Sub
Private Sub HLSelectButton_MouseLeave(ByVal sender As Object, ByVal
e As System.EventArgs) Handles Me.MouseLeave
mMouseHover = False
Invalidate()
RaiseEvent ReportMouseStatus(False)
End Sub
End Class
End Namespace
On the app that I am creating I have:
Imports HLMultiSelect.Forms.Controls
Public Class Form1
Public WithEvents sMouse As New HLMultiSelect
Private Sub sMouse_ReportMouseStatus(ByVal bStatus As Boolean) Handles
sMouse.ReportMouseStatus
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.
that I have created separate from the app.
On the control I have:
Namespace HLMultiSelect.Forms.Controls
Public Class HLMultiSelect
Inherits System.Windows.Forms.Control
Public Event ReportMouseStatus(ByVal bStatus As Boolean)
Private Sub HLSelectButton_MouseEnter(ByVal sender As Object, ByVal
e As System.EventArgs) Handles Me.MouseEnter
mMouseHover = True
Invalidate()
RaiseEvent ReportMouseStatus(True)
End Sub
Private Sub HLSelectButton_MouseLeave(ByVal sender As Object, ByVal
e As System.EventArgs) Handles Me.MouseLeave
mMouseHover = False
Invalidate()
RaiseEvent ReportMouseStatus(False)
End Sub
End Class
End Namespace
On the app that I am creating I have:
Imports HLMultiSelect.Forms.Controls
Public Class Form1
Public WithEvents sMouse As New HLMultiSelect
Private Sub sMouse_ReportMouseStatus(ByVal bStatus As Boolean) Handles
sMouse.ReportMouseStatus
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.