Zexor
Well-known member
- Joined
- Nov 28, 2008
- Messages
- 520
- Programming Experience
- 3-5
i have dynamically created a picturebox and its click event
and it works fine, but i also want to sense which mouse button was clicked, so i changed it to
but because i have Strict On, i get a narrowing in implicit type conversions error on declaring the handler. How do i fix that?
VB.NET:
Dim pic As New PictureBox
AddHandler pic.Click, AddressOf pic_Click
Private Sub pic_Click(sender As Object, e As EventArgs)
End Sub
and it works fine, but i also want to sense which mouse button was clicked, so i changed it to
VB.NET:
AddHandler pic.Click, AddressOf pic_Click
Private Sub pic_Click(sender As Object, e As System.Windows.Forms.MouseEventArgs)
End Sub
but because i have Strict On, i get a narrowing in implicit type conversions error on declaring the handler. How do i fix that?