Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15107

Option Strict On disallows late binding.

$
0
0
Hi,

In a subroutine I have:
Code:

  AddHandler box.Click, AddressOf Move
I'm trying to read the name of the sender so that I can extract which (Picture) box has been clicked.
Code:

    Public Function Move(sender As Object, e As System.EventArgs) As Boolean
        Dim sn As String = sender.Name

Entering the code above I get an error message:
Quote:

Option Strict On disallows late binding.
With a breakpoint I can see that sender is a PictureBox and it's Name is 'PictureBox1'.

What am I doing wrong ?

Poppa

Viewing all articles
Browse latest Browse all 15107

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>