warning BC40004: sub 'MouseDown' conflicts with event 'MouseDown' in the base class 'Control'

R

Rob

How can I fix the following warning

warning BC40004: sub 'MouseDown' conflicts with event 'MouseDown'
in the base class 'Control' and so should be declared 'Shadows'.

This warning appears because I entered the following Sub
Private Sub MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) _

Handles AxWebBrowser1.MouseDown

End Sub

TIA Robert
 
C

CJ Taylor

change the sub to be

Pirvate Sub onMouseDown(sender as object, e as
System.Windows.Forms.MouseEventArgs)

How does an ActiveX control expose a .NET Class?
(system.windows.forms.MouseEventArgs)
 
H

Herfried K. Wagner [MVP]

* "Rob said:
warning BC40004: sub 'MouseDown' conflicts with event 'MouseDown'
in the base class 'Control' and so should be declared 'Shadows'.

This warning appears because I entered the following Sub
Private Sub MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) _

Handles AxWebBrowser1.MouseDown

\\\
Private Sub AxWebBrowser1_MouseDown(...) Handles AxWebBrowser1.MouseDown
...
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top