title: Resize Bordless Form is Glitchy
body: <p>My code to resize my form from the right hand side works, but is really glitchy or has a lot of lag. All my images blur and my drawn rectangles flicker while I'm resizing. Everything is normal however once mouseup.</p>
  
  <p>I put the formborderstyle from borderless to sizable and the form resizes normally. </p>
  
  <p>Hoping someone might be able to point out what is wrong with my code.</p>
  
  <pre><code>Dim myresize As Boolean = False
  Dim cursorx As Integer
  Dim cursory As Integer
  
  Private Sub TableLayoutPanel1_MouseDown(sender As Object, e As MouseEventArgs) Handles TableLayoutPanel1.MouseDown
  
      If e.Location.X &gt; Me.Width - 7 And e.Location.Y &gt; 11 And e.Location.Y &lt; Me.Height - 10 Then
          myresize = True
          cursorx = Windows.Forms.Cursor.Position.X - Me.Width
          cursory = Windows.Forms.Cursor.Position.Y - Me.Height
      End If
  
  End Sub
  
  Private Sub TableLayoutPanel1_MouseMove(sender As Object, e As MouseEventArgs) Handles TableLayoutPanel1.MouseMove
  
      If myresize = True Then
          Me.Width = Windows.Forms.Cursor.Position.X - cursorx
      End If
  
  End Sub
  
  Private Sub TableLayoutPanel1_MouseUp(sender As Object, e As MouseEventArgs) Handles TableLayoutPanel1.MouseUp
  
      myresize = False
  
  End Sub
  </code></pre>