📜  如何检查 vs 表单中控件之间的交集 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:15.726000             🧑  作者: Mango

代码示例1
Picturebox pic = new Picturebox();
foreach(Control picturebox in Form1){
   if (pic.Bounds.IntersectsWith(picturebox.Bounds))
   {
       //We have a problem, Houston, because we just collided!
   }
}