R
rossmclean
Hi,
I'm trying to get the mouse wheel event, but i cant quite nail it! I
have tried a few things, but I never get it to work, although I did
have it working at one point, but now it's stoped!!!
I have in my form code:
Sub PicBoxMap_MouseWheel(ByVal sender As Object, ByVal e As
system.Windows.Forms.MouseEventArgs)
'///
end sub
And in the designer:
AddHandler Me.PicBoxMap.MouseWheel, AddressOf Me.PicBoxMap_MouseWheel
this complies but does not fire.
When i add the handles like this:
form code:
Sub PicBoxMap_MouseWheel(ByVal sender As Object, ByVal e As
system.Windows.Forms.MouseEventArgs) Handles PicBoxMap.MouseWheel
Desinger code:
AddHandler Me.PicBoxMap.MouseWheel, AddressOf Me.PicBoxMap_MouseWheel
Dim WithEvents PicBoxMap_MouseWheel As
System.Windows.Forms.MouseEventArgs
I get the following 3 errors:
Method 'Private Dim WithEvents PicBoxMap_MouseWheel As
System.Windows.Forms.MouseEventArgs' does not have the same signature
as delegate 'Delegate Sub MouseEventHandler(sender As Object, e As
System.Windows.Forms.MouseEventArgs)'. (BC30408) -
Handles clause requires a WithEvents variable defined in the
containing type or one of its base types. (BC30506)
'PicBoxMap_MouseWheel' is already declared as 'Private Dim WithEvents
PicBoxMap_MouseWheel As System.Windows.Forms.MouseEventArgs' in this
class. (BC30260)
I have looked and tried diffrent combinations of things, but i dont
really understand what I need to do, can someone help me out!
Many thanks
Ross
I'm trying to get the mouse wheel event, but i cant quite nail it! I
have tried a few things, but I never get it to work, although I did
have it working at one point, but now it's stoped!!!
I have in my form code:
Sub PicBoxMap_MouseWheel(ByVal sender As Object, ByVal e As
system.Windows.Forms.MouseEventArgs)
'///
end sub
And in the designer:
AddHandler Me.PicBoxMap.MouseWheel, AddressOf Me.PicBoxMap_MouseWheel
this complies but does not fire.
When i add the handles like this:
form code:
Sub PicBoxMap_MouseWheel(ByVal sender As Object, ByVal e As
system.Windows.Forms.MouseEventArgs) Handles PicBoxMap.MouseWheel
Desinger code:
AddHandler Me.PicBoxMap.MouseWheel, AddressOf Me.PicBoxMap_MouseWheel
Dim WithEvents PicBoxMap_MouseWheel As
System.Windows.Forms.MouseEventArgs
I get the following 3 errors:
Method 'Private Dim WithEvents PicBoxMap_MouseWheel As
System.Windows.Forms.MouseEventArgs' does not have the same signature
as delegate 'Delegate Sub MouseEventHandler(sender As Object, e As
System.Windows.Forms.MouseEventArgs)'. (BC30408) -
Handles clause requires a WithEvents variable defined in the
containing type or one of its base types. (BC30506)
'PicBoxMap_MouseWheel' is already declared as 'Private Dim WithEvents
PicBoxMap_MouseWheel As System.Windows.Forms.MouseEventArgs' in this
class. (BC30260)
I have looked and tried diffrent combinations of things, but i dont
really understand what I need to do, can someone help me out!
Many thanks
Ross