Is there any practical difference between the two procedures in the following class?
I suppose the second sub could be Private or Public as well so, in the latter case, it could be called from outside. But is there anything more?
Code:
Public Class Class1
Inherits PictureBox
Protected Overrides Sub OnMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs)
If TypeOf Me.Parent Is Form Then Me.Parent.Text = e.X
MyBase.OnMouseMove(e)
End Sub
Protected Sub Class1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
If TypeOf Me.Parent Is Form Then Me.Parent.Text = e.X
End Sub
End Class
I suppose the second sub could be Private or Public as well so, in the latter case, it could be called from outside. But is there anything more?
Last edited: