You could use this function that I'm using in a game I wrote

VB Code:
  1. '' What is the distance between two given set of co-ordinates ?
  2. Private Function DistanceBetweenTwoPoints(point1 As CoOrd_type, point2 As CoOrd_type) As Single
  3.     DistanceBetweenTwoPoints = (((point2.X - point1.X) ^ 2) + ((point2.Y - point1.Y) ^ 2)) ^ 0.5
  4. End Function

CoOrd_type is a UDT that just as a .x and a .y member