O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.1. Understanding the Rendering Process

In previous chapters of this book, you learned how to draw graphics shapes, curves, and images. In all of these cases, the Graphics object is responsible for the drawing. When we’re drawing graphics objects from within a menu or button click event handler, a call to the Invalidate method becomes imperative. If we don’t call this method, the form will not paint itself, but if we write the same code on a form’s OnPaint or paint event handler, there is no need to invalidate the form. In this section we will find out why that’s so.

13.1.1. Understanding the Paint Event

Paint event functionality is defined in the System.Windows.Forms.Control class, which is the base class for Windows Forms controls such ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required