-2
내 코드에서 do while 루프를 z 변수로 사용하려면 어떻게해야합니까?"variable".Bounds.IntersectsWith
Function make(ByVal z As Object)
z.Location = zloc
z.Hide()
zloc = New Point(RandomNumber(playspace.Width), RandomNumber(playspace.Height))
If zloc.Y > 595 Then
zloc = New Point(RandomNumber(playspace.Width), RandomNumber(playspace.Height))
End If
z.location = zloc
Do While z.bounds.intersectswith(PictureBox1.Bounds, PictureBox2.Bounds, PictureBox3.Bounds)
zloc = New Point(RandomNumber(playspace.Width), RandomNumber(playspace.Height))
z.location = zloc
Loop
z.Location = zloc
z.Show()
Return (z)
End Function
문제는 변수에서 ".bounds.intersectswith"를 사용할 수 없다는 것입니다.