In MouseDown store the point where the user clicked (e.X and e.Y) into a point structure (lets say, P1)
In MouseUp store the point where the user released (e.X and e.Y) into another point structure (lets say, P2)
Create a
rectangle, not a square, from these two points by calculating a left, top, right, and bottom value for the rectangle.
The left is the minimum of the X coordinate of the points P1 and P2
The top is the minimum of the Y coordinate of P1 and P2
Right is the maximum of the X coordinates
and Bottom is the maximum of the Y coordinates.
You should now have a rectangle (lets say, R1)
To draw the square, you have your choice of getting access to a graphics object.
Dim GFX As Graphics
GFX = Me.CreateGraphics()
gets a graphics object that draws onto the form.
Use this graphics object to draw a rectangle.
GFX.DrawRectangle(Pens.Black, R1)