Thanks Mr.Boops Boops. Instead of creating Graphics object, I used e.Graphics and I think my flickering problem is solved. But now I am facing an another problem because of it.
Earlier I was rotating the whole graphics i.e. the four rectangles using GraphicsPath RotateTransform.RotateAt method to specify the rotation point.
But now with e.graphics I am not able to specify the point to rotate at. The code I used earlier is pasted below. Please go through it and let me know how to rotate e.graphics by specifying the rotateAt point
Code:Dim RotationTransform As New Matrix(1, 0, 0, 1, 0, 0) ' rotation matrix Dim TranslationTransform As New Matrix(1, 0, 0, 1, 0, 0) ' translation matrix Dim RotationTransform As New Matrix(1, 0, 0, 1, 0, 0) ' rotation matrix Dim TranslationTransform As New Matrix(1, 0, 0, 1, 0, 0) ' translation matrix RotationTransform.RotateAt(NumericUpDown1.Value, New PointF(512, 512)) 'Convert Direction to degrees gp.Transform(RotationTransform)




Reply With Quote