好的,所以我有一个图片框,我必须检查与标签的碰撞。 但由于我有65个标签,有没有办法一次性将我的语句应用于所有标签而不是复制和粘贴if语句?
If PictureBox1.Bounds.IntersectsWith(Lbl1.Bounds) Then
PictureBox1.Top = 84
PictureBox1.Left = 18
points()
End If
If PictureBox1.Bounds.IntersectsWith(Lbl2.Bounds) Then
PictureBox1.Top = 84
PictureBox1.Left = 18
points()
End If
If PictureBox1.Bounds.IntersectsWith(Lbl3.Bounds) Then
PictureBox1.Top = 84
PictureBox1.Left = 18
points()
End If