title: Draw a line between to "Max/Min" Points
body: <p>Well, I'm back with another brain buster :)</p>
  
  <p>I need to draw a line between 2 shots that are the max spread.</p>
  
  <p>I am using the below code, but it draws the lines between the rectangle corners.  I know this is wrong, but not sure how to find the points using this code.</p>
  
  <p>I updated the code very long hand (so my brain can wrap around it).  </p>
  
  <p>Basically one of the "L" variables will test out to be the longest.  I then need to grab the corresponding points to that "L" variable.</p>
  
  <pre><code> Private Sub DrawMaxCTCLine(g As Graphics)
              Dim minx, miny, maxx, maxy As Integer
      Dim P1, P2, P3, P4 As Point
      Dim L1, L2, L3, L4, L5, L6 As Decimal
  
      maxx = shotList.Max(Function(point) point.X)
      maxy = shotList.Max(Function(point) point.Y)
      minx = shotList.Min(Function(point) point.X)
      miny = shotList.Min(Function(point) point.Y)
  
      P1 = shotList.Find(Function(point) point.X = maxx)
      P2 = shotList.Find(Function(point) point.Y = maxy)
      P3 = shotList.Find(Function(point) point.X = minx)
      P4 = shotList.Find(Function(point) point.Y = miny)
  
      L1 = Math.Sqrt((P1.X - P2.X) ^ 2 + (P1.Y - P2.Y) ^ 2)
      L2 = Math.Sqrt((P1.X - P3.X) ^ 2 + (P1.Y - P3.Y) ^ 2)
      L3 = Math.Sqrt((P1.X - P4.X) ^ 2 + (P1.Y - P4.Y) ^ 2)
      L4 = Math.Sqrt((P2.X - P3.X) ^ 2 + (P2.Y - P3.Y) ^ 2)
      L5 = Math.Sqrt((P2.X - P4.X) ^ 2 + (P2.Y - P4.Y) ^ 2)
      L6 = Math.Sqrt((P3.X - P4.X) ^ 2 + (P3.Y - P4.Y) ^ 2) 
  </code></pre>
  
  <p>here is a better image of the line i am talking about (highlighted)</p>
  
  <p><a href="https://i.stack.imgur.com/GFQwf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GFQwf.png" alt="enter image description here"></a></p>
  
  <p>Here is an image when only 2 shots are shown (which works)
  <a href="https://i.stack.imgur.com/2LU7C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2LU7C.png" alt=""></a></p>
  
  <p>Here is an image when 3 or more shots are shown (which doesn't work work)
  Note the line is drawn to the upper left corner and not the shot
  <a href="https://i.stack.imgur.com/mictz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mictz.png" alt=""></a></p>