samedi 20 février 2021

Check if someone click a pictureBox in my windows form C#

public void Sceltapokemon()
        {
            foreach(var control in this.Controls)
            {
                if(control is PictureBox)
                {
                    if(((PictureBox)control).MouseClick += Form1_MouseClick)
                    {

                    }
                }
            }
        }

I did this, but i think is not correct, can you help me? (I' m a beginner with c#), and the form of my project there are only picturebox

Aucun commentaire:

Enregistrer un commentaire