how do I register my Mouse wheel handler in my main VB .net 2005 form?
My function
Private Sub Me_MouseWheel(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Me.MouseWheel
never gets called. What do I need to do to tell VB that this function
should handle the mouse wheel event?
In the designer, on the events list I do not have a MouseWheel event,
only MouseUp, MouseDown, MouseEnter, MouseLeave, MouseHover, MouseMove.
If I could get MouseWheel into this my problems are most likely
resolved.
Thanks for any help
Ingmar
Protected Overrides Sub OnMouseWheel(ByVal e As
System.Windows.Forms.MouseEventArgs)
Me_MouseWheel(Me, e)
End Sub
However, this also seems to never get called :-(
Replace 'Me.MouseWheel' with 'MyBase.MouseWheel' or alternatively override
the form's 'OnMouseWheel' method.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Private Sub PictureBox1_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter
PictureBox1.Focus()
End Sub
Private Sub pictureBox1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseWheel
' your process
End Sub
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com