Visual Inheritance problem: Am I missing something?

  • Thread starter Thread starter Randall Berkeley
  • Start date Start date
R

Randall Berkeley

I have had the same problem since the first release of
VS .NET, I have given up trying to anchor anything to the
right or bottom. The designer seems move the anchored
controls when the form is resized, then adds the
difference to the control location inside the
InitializeComponent() method. Even locking the controls
doesn't help. You might try adding a panel to your form
that is docked to the bottom or right side of your form
and add the controls to the panel and anchor them
top/left. If you find a better solution, please let me
know.
 
Hi Randall,
I'm sorry to say it's an known bug, you may refer to this Artical in
KB for more information.
http://support.microsoft.com/default.aspx?scid=kb;en-us;316560
We are investigating to fix this problem in the next version, thanks!


Kind regards,

Ying-Shen Yu [MS]
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2001 Microsoft Corporation. All rights
reserved.
--------------------
| Content-Class: urn:content-classes:message
| From: "Randall Berkeley" <randall@_NOSPAM_omnilogix.com>
| Sender: "Randall Berkeley" <randall@_NOSPAM_omnilogix.com>
| References: <[email protected]>
| Subject: Visual Inheritance problem: Am I missing something?
| Date: Sun, 7 Sep 2003 16:23:25 -0700
| Lines: 63
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcN1lwlj4EvQR2SGQxSeNIkGtjAvIA==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:51830
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| I have had the same problem since the first release of
| VS .NET, I have given up trying to anchor anything to the
| right or bottom. The designer seems move the anchored
| controls when the form is resized, then adds the
| difference to the control location inside the
| InitializeComponent() method. Even locking the controls
| doesn't help. You might try adding a panel to your form
| that is docked to the bottom or right side of your form
| and add the controls to the panel and anchor them
| top/left. If you find a better solution, please let me
| know.
|
| >-----Original Message-----
| >Hi All,
| >
| >I have a strange problem shown in the attached project.
| >
| >I tried to follow the approach, described in one of the
| articles on MSDN
| >(NET Development (General) Technical Articles "Getting
| Started with
| >Windows Forms"). The idea is to have a base form for
| visual inheritance with
| >a couple of buttons, anchored bottom right.
| >If you don't change the size of the inherited form at
| design time,
| >everything is OK. You can change the form's size at
| runtime and buttons will
| >be anchored correctly.
| >If you do change the size at design time, the button's
| position becomes
| >incorrect. When you just drag form's sizing handles in
| designer, everything
| >is still OK, but when you compile the project, buttons
| moves away even in
| >design view. And of course buttons are in wrong position
| at run time.
| >
| >Probably, it is because designer for derived form puts
| some code into
| >InitializeComponent() to change the form's size and
| adjust button's position
| >and designer is unaware that because of anchoring in
| superclass (BaseForm1)
| >the position will be adjusted there too...
| >
| >In the project I have a FormBase1, which contains several
| buttons on it
| >anchored bottom right and a DerivedForm2 which inherits
| from FormBase1.
| >
| >Is there a way to circumvent this behavior? Is there
| a "right" way to do
| >this? Am I missing something?
| >
| >I have a VS2003 (7.1.308) and Framework 1.1 (1.1.4322).
| >
| >Any suggestions will be appreciated
| >
| >Boris
| >
| >
| >
|
 
Back
Top