Microsoft KB Archive/824451

= Layout Changes for Controls That Are in an Inherited User Control =

Article ID: 824451

Article Last Modified on 10/25/2005

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition

-



SYMPTOMS
If you put a control (such as the TextBox control) on an inherited Microsoft Windows Form, and then you save and reload the form in the designer, the layout of the control may change. This problem affects the position and the size of the control.



RESOLUTION
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Visual Studio .NET service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Version       Size       File name -  19-Jul-2003  00:23  1.1.4322.926  2,039,808  System.Windows.Forms.dll 19-Jul-2003 00:23  1.1.4322.926  1,703,936  System.Design.dll 19-Jul-2003 00:23  1.1.4322.926    466,944  System.Drawing.dll



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the Standard Terminology That Is Used to Describe Microsoft Software Updates

Steps to Reproduce the Behavior
To reproduce this problem, follow these steps:
 * 1) In Microsoft Visual Studio .NET, create a new Windows Application Project. By default, Form1 is created.
 * 2) Add a new user control to the project. By default, UserControl1 is created.
 * 3) Change the properties of UserControl1 to the following:
 * 4) * DockPadding: All 10
 * 5) * 'Size: 300;200'
 * 6) Add a panel control to UserControl1. By default, panel1 is created.
 * 7) Change the properties of panel1 to the following:
 * 8) * BorderStyle: Fixed3D
 * 9) * Dock: Fill
 * 10) * Modifiers: Protected
 * 11) Save the project, and then build the solution.
 * 12) Create an Inherited Control. In Inheritance Picker, use UserControl1 for the value of Base class.
 * 13) Add a TextBox control to the inherited UserControl2 object that is in the inherited panel. By default, TextBox1 is created.
 * 14) Change the properties of Textbox1 to the following:
 * 15) * Location: 10:10
 * 16) * Size: 100;20
 * 17) * Anchor: Top, Bottom, Left, Right
 * 18) Save UserControl2, and then close the designer.
 * 19) In the designer, open UserControl2 again. All the program elements work as expected to this point.
 * 20) Change the Size property of UserControl2 to 400;300, and then save UserControl2.
 * 21) In the designer, close and then reopen UserControl2.

TextBox1 is wider than it was in step 11. However, it is wider than is expected for the Size property setting that you applied in step 12.
 * 1) Save UserControl2.
 * 2) In the designer, close and then reopen UserControl2 repeatedly.

TextBox1 is wider each time that you open UserControl2.

Keywords: kbbug kbfix kbqfe kbhotfixserver KB824451

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.