ARTICLE
Drawing With no OnPaint Method
Tags: .NET, C#, GDI+, GDI+ and Graphics, Graphics, Graphics Programming, onPaint, OnPaint Method, Pen class, RadioButton, SolidBrush
In this sample example, I draw GDI+ objects on button click.
Couple of people have asked on discussion forums about drawing with no OnPaint method or event.
Why OnPaint method? The main reason is we can get Graphics object easily on paint method. Actually painting with no OnPaint method is very simple. Just you need Graphics object for the form you're drawing on.
In this sample example, I draw GDI+ objects on button click.
