Answers for "how to check for intersection between controls in vs forms"

0

how to check for intersection between controls in vs forms

Picturebox pic = new Picturebox();
foreach(Control picturebox in Form1){
   if (pic.Bounds.IntersectsWith(picturebox.Bounds))
   {
       //We have a problem, Houston, because we just collided!
   }
}
Posted by: Guest on December-16-2020

Code answers related to "how to check for intersection between controls in vs forms"

Browse Popular Code Answers by Language