System.Windows.Forms 1.0.5000.0 2.0.0.0 System.Enum System.Flags Controls use this enumeration in various properties and methods to specify functionality. A control can enable a style by calling the method and passing in the appropriate bit (or bits) and the Boolean value to set the bit(s) to. For example, the following line of Visual Basic code would enable double-buffering. myControl.SetStyle(UserPaint Or AllPaintingInWmPaint Or DoubleBuffer, True) If the bit is set to true, the window message WM_ERASEBKGND is ignored, and both and methods are called directly from the window message WM_PAINT. This generally reduces flicker unless other controls send the window message WM_ERASEBKGND to the control. You might send the window message WM_ERASEBKGRND to achieve a pseudo-transparent effect similar to ; for example, a with flat appearance does this. To fully enable double-buffering, you can set the and bits to true. However the preferred method for enabling double buffering, which yields the same result, is to set the property for the control to true. If the bit is set to true, and the is set to a color whose alpha component is less than 255, will simulate transparency by asking its parent control to paint the background. This is not true transparency. If there is another control between the control and its parent, the current control will not show the control in the middle. When the bit is set to true, the following methods are still called: , , , , , , and . When the control is clicked, if the bit is set to true the method is called and it raises the event. When the control is double-clicked, and both the and bits are set to true, the click is passed on to the event. Then the method is called and it raises the event. However, the control can call or directly regardless of the and bit values. For more information on control click and double click behaviors, see the and topics. When the bit is set and there is a value in the control's Text property, the value of that control's Text property determines the control's default Active Accessibility name and shortcut key. Otherwise, the text of the preceding control will be used instead. This style is set by default. Certain built-in control types, such as and , reset this style so that the Text property of those controls will not be used by Active Accessibility. Specifies the style and behavior of a control. Field System.Windows.Forms.ControlStyles If true, the control ignores the window message WM_ERASEBKGND to reduce flicker. This style should only be applied if the bit is set to true. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control keeps a copy of the text rather than getting it from the each time it is needed. This style defaults to false. This behavior improves performance, but makes it difficult to keep the text synchronized. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control is a container-like control. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, drawing is performed in a buffer, and after it completes, the result is output to the screen. Double-buffering prevents flicker caused by the redrawing of the control. If you set to true, you should also set and to true. 1.0.5000.0 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) Field System.Windows.Forms.ControlStyles If true, the method is called for every message sent to the control's . This style defaults to false. does not work in partial trust. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control has a fixed height when auto-scaled. For example, if a layout operation attempts to rescale the control to accommodate a new , the control's remains unchanged. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control has a fixed width when auto-scaled. For example, if a layout operation attempts to rescale the control to accommodate a new , the control's remains unchanged. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control is drawn opaque and the background is not painted. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control is first drawn to a buffer rather than directly to the screen, which can reduce flicker. If you set this property to true, you should also set the to true. 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control is redrawn when it is resized. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control can receive focus. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control implements the standard behavior. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control implements the standard behavior. This style is ignored if the bit is not set to true. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control accepts a with an alpha component of less than 255 to simulate transparency. Transparency will be simulated only if the bit is set to true and the parent control is derived from . 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control does its own mouse processing, and mouse events are not handled by the operating system. 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles If true, the control paints itself rather than the operating system doing so. If false, the event is not raised. This style only applies to classes derived from . 1.0.5000.0 2.0.0.0 Field System.Windows.Forms.ControlStyles Specifies that the value of the control's Text property, if set, determines the control's default Active Accessibility name and shortcut key. 2.0.0.0