How to resize from a form to the left?

1

I was needing to resize a borderless% color with the mouse, I looked for some ways to do this, but all of them when the mouse exits from Form Form stops. So I decided to do it this way:

Private Sub Panel3_MouseDown(sender As Object, e As MouseEventArgs) Handles Panel3.MouseDown
    mbot = True
End Sub

Private Sub Panel3_MouseUp(sender As Object, e As MouseEventArgs) Handles Panel3.MouseUp
    mbot = False
End Sub

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

    If mbot Then                 
        Height += MousePosition.Y - Height - Top        
    End If

End Sub

This worked out right, both right, down and vertex (right / down), but I could not do it up and to the left. I tried in several ways and the one that worked the most was this:

  Dim pos = Width
    Dim loc = Left

    If mleft Then

        DesktopLocation = New Point(MousePosition.X, DesktopLocation.Y)
        Width = pos + loc - Left

    End If

I've done what with resize changing location by following the cursor and the difference of the previous position and the new one was added to Form . Her problem is that when Width is moved, the right side blinks. So what I wanted to know is how I can "increase" Form to the left without this problem.

    
asked by anonymous 17.11.2018 / 18:18

0 answers