Dynamic click event on PictureBox

后端 未结 2 2003
说谎
说谎 2021-01-28 18:12

I am getting a list of pictures from a directory and storing the filenames in a List. I then loop through each of these and create a PictureBox<

2条回答
  •  余生分开走
    2021-01-28 19:00

    sender is the PictureBox that was clicked:

    private void PictureClick(object sender, EventArgs e) {
        PictureBox oPictureBox = (PictureBox)sender;
        // add border, do whatever else you want.
    }
    

提交回复
热议问题