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.3. Understanding the SetStyle Method

Windows Forms and controls provide built-in support for double buffering, and the SetStyle method of the Control class plays a vital role in this process. Before we discuss how to use SetStyle, let’s take a look at this method and its members.

The SetStyle method is defined in System.Windows.Forms.Control, which sets the specified style of a control. This method takes two arguments. The first argument is of type ControlStyle enumeration, and it represents the style of the control. The second argument is true if we want to apply the specified style, false otherwise. The members of the ControlStyle enumeration are described in Table 13.1.

Table 13.1. ControlStyle members
MemberDescription
AllPaintingInWmPaint ...

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