VB Code:
  1. 'change this part
  2. Command1.Left = Command1.Left + (X - FirstX)
  3. Command1.Top = Command1.Top + (Y - FirstY)
  4.  
  5. 'to
  6.  
  7. Command1.width = Command1.width + (X - FirstX)
  8. Command1.height = Command1.height + (Y - FirstY)