. . . "Using global scope for pens, brushes, paths, and other objects may be useful instead of defining variable in the OnPaint or OnPaintBackGround methods." .