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:
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove Dim drawPath As New GraphicsPath() Dim gr As Graphics = Me.CreateGraphics drawPath.AddEllipse(e.X, e.Y, 100, 150) Me.Invalidate() gr.FillPath(Brushes.Red, drawPath) 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).






Reply With Quote