Sets a specified System.Windows.Forms.ControlStyles flag to either true or false.
- flag
- The System.Windows.Forms.ControlStyles bit to set.
- value
- true to apply the specified style to the control; otherwise, false.
Control style bit flags are used to categorize supported behavior. A control can enable a style by calling the Control.SetStyle(ControlStyles, bool) method and passing in the appropriate System.Windows.Forms.ControlStyles bit (or bits) and the Boolean value to set the bit(s) to. To determine the value assigned to a specified System.Windows.Forms.ControlStyles bit, use the Control.GetStyle(ControlStyles) method and pass in the System.Windows.Forms.ControlStyles member to evaluate.
Setting the control style bits can substantially change the behavior of the control. Review the System.Windows.Forms.ControlStyles enumeration documentation to understand the effects of changing the control style bits before calling the Control.SetStyle(ControlStyles, bool) method.