We ported win-form application legacy code developed in c# .net framework 1.1 to c# .net 3.5.
There is functionality for drawing dot plot and apply different shapes(polygon,square etc.) on dots in plot. You can change size of applied shape by dragging using mouse what happening is when dragging shape some part get invisible till we drop to new point and also draws very slow speed.
you can call it as flickering .
this functionality works fine in windows xp, in windows 7 works fine with basic and classic theme
it flickers only when aero theme is applied in windows 7
i have tried http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/aaed00ce-4bc9-424e-8c05-c30213171c2c and Flickering in a Windows Forms app
none of them helped.
after time stamping execution time i found that
for (int i=0; i < arraypnts.Length - 1; i++) {
g.DrawLine(Pens.Black, arraypnts[i], arraypnts[i+1]);
}
// draw the last line
g.DrawLine(Pens.Black, arraypnts[0], arraypnts[arraypnts.Length-1]);
takes hell lot of time when aero theme applied compared to basic theme applied