BUG: The window style flags that you set when you inherit from the CreateParams property are not applied to the control after you call the Control.SetTopLevel method (814738)
The information in this article applies to:
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
- Microsoft Visual Basic 2005
SYMPTOMSThe window style flags that you set when you inherit from
the CreateParams property are not applied to the control after you call the Control.SetTopLevel method if you follow these steps:
- You inherit from the System.Windows.Forms.Control class to create a control.
- You override the CreateParams property.
RESOLUTIONTo resolve this bug, reapply the styles to the custom
control. To do this, add the following statement after you call the SetTopLevel method: Visual Basic .NET or Visual Basic 2005 Code' Reapplies the assigned styles to the control.
myCustomControl.UpdateStyles() Visual C# .NET Code// Reapplies the assigned styles to the control.
myCustomControl.UpdateStyles(); STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.REFERENCESFor more information, visit the following MSDN Web site:
Modification Type: | Minor | Last Reviewed: | 10/3/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbvs2002sp1sweep kbstyle kbProperties kbCtrl kbControl kbbug KB814738 kbAudDeveloper |
---|
|