This is just a samlpe that I made to demonstrate my PAIN
I want a simple shape to move on the screen as the user moves the mouse, but it just flickers. here's my code:

VB Code:
  1. Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
  2.         Dim drawPath As New GraphicsPath()
  3.         Dim gr As Graphics = Me.CreateGraphics
  4.  
  5.         drawPath.AddEllipse(e.X, e.Y, 100, 150)
  6.         Me.Invalidate()
  7.         gr.FillPath(Brushes.Red, drawPath)
  8.     End Sub

and here's a screenshot:

The red ellipse is supposed to move on the screen as you move the mouse. Well, it does, but the screen flickers.I'm trying to refresh the screen by using Me.Invalidate, that causes the flicker. I dont know any other way


Download the file to see it yourself (next post).