Simen  S M

Simen S M

  • NA
  • 35
  • 32k

'..' is not declared. It may be inaccessible due to its protection level.

Jan 26 2012 10:39 AM
Hi guys!

I have little problem. I have followed THIS guide, so my code looks like this:

    Private Sub mpButton_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
        '' Declare MultiPoint mouse button handler
        AddHandler mpButton.MultipointClick, AddressOf mpButton_Click

    End Sub

Im getting this error right here: 'mpButton' is not declared. It may be inaccessible due to its protection level.
The mpButton exists.

Do I have to add this:   
        Dim mpButton As New MultipointButton

But that gives me this error:

'MultipointClick' is not an event of 'Scoreboard.MainWindow.MultipointButton'.

So it looks like my Addhandler code is not an event, am I right?
What am I doing wrong?

Thanks for all help!


Answers (1)