Hello,

Situation:
I am creating a 2D game for college which is a simple dodging game in C#, the player can move left and right to dodge falling pictureboxes as well as collecting them.

problem:
i have added collision to the pictureboxes which works absolutely fine except one problem; when the players avatar
picturebox collides with the falling picturebox, the falling picturebox needs to be deleted otherwise it would keep taking chunks of health every tick of the timer which the detection if statement is in. but when i delete the picturebox using the remove control, the player still collides with where the picturebox was.

question: hw do i fully delete a picturebox that doesnt leave anything behind.

code for removing picturebox:

Code:
 if (pictureBox1.Bounds.IntersectsWith(pictureBox5.Bounds)) {
                
                this.Controls.Remove(pictureBox5);
                pictureBox5.Dispose();
                hp = hp - 10;

            }
thanks in advance.
this is my first post on this forum, if there is anything i could do better in my post, please let me know <3

Arrokai