Sub Form1_MouseDown (x,y)
If (x>10 AND x<10 + 160* scale) AND (y>5 AND y<5 + 256 * scale) Then
px= Int((x * scale -10) / (16*scale))
py= Int((y * scale -5) / (16*scale))
pXmin=9
pXmax=0
pYmin=15
pYmax=0
For i=0 To 3
If pXmin>tempX(i) Then pXmin=tempX(i)
If pXmax<tempX(i) Then pXmax=tempX(i)
If pYmin>tempY(i) Then pYmin=tempY(i)
If pYmax<tempY(i) Then pYmax=tempY(i)
Next
If px >= pXmin AND px <= pXmax Then
If py < pYmin Then
RotateShape
Else
timer1_tick
End If
Else If px < pXmin
MoveShape(-1,0)
Else If px > pXmax
MoveShape(1,0)
End If
End If
End Sub