Hallo Zusammen,
Ich bin derzeit am entwickeln eines simplen Spiels...
Man muss mit einer picturebox über eine andere picturebox "fahren", damit das Spiel weitergeht.
Ich möchte dies mit Hilfe der Location Funktion machen...
Also:
If PictureBox1.Location.X = PictureBox2.Location.X And PictureBox1.Location.Y = PictureBox2.Location.Y Then
bla bla bla
End If
Das Problem:
Die PictureBox muss absolut genau über der zweiten liegen, damit es funzt.
Kann man das irgendwie anders machen?
Gibt es eine Möglichkeit, die Abfrage so zu verändern, damit es nicht genau sein muss, sondern +/- 5 oder so, sein kann?!
z.b.:
If PictureBox1.Location.X ist gleich etwa PictureBox2.Location.X And PictureBox1.Location.Y ist gleich etwa PictureBox2.Location.Y Then
bla bla bla
End If
Könnt ihr mir helfen?
Ich bin derzeit am entwickeln eines simplen Spiels...
Man muss mit einer picturebox über eine andere picturebox "fahren", damit das Spiel weitergeht.
Ich möchte dies mit Hilfe der Location Funktion machen...
Also:
If PictureBox1.Location.X = PictureBox2.Location.X And PictureBox1.Location.Y = PictureBox2.Location.Y Then
bla bla bla
End If
Das Problem:
Die PictureBox muss absolut genau über der zweiten liegen, damit es funzt.
Kann man das irgendwie anders machen?
Gibt es eine Möglichkeit, die Abfrage so zu verändern, damit es nicht genau sein muss, sondern +/- 5 oder so, sein kann?!
z.b.:
If PictureBox1.Location.X ist gleich etwa PictureBox2.Location.X And PictureBox1.Location.Y ist gleich etwa PictureBox2.Location.Y Then
bla bla bla
End If
Könnt ihr mir helfen?