add on click event to picturebox vb.net

前端 未结 2 1615
醉酒成梦
醉酒成梦 2021-01-13 16:24

I have a flowLayoutPanel which I am programatically adding new panelLayouts to. Each panelLayout has a pictureBox within it. It\'s all working nicely, but I need to detect w

2条回答
  •  醉话见心
    2021-01-13 16:57

    Substitute PictureBox1 with the name of your control.

    Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
        'executes when PictureBox1 is clicked
    End Sub
    

提交回复
热议问题