Anchored Control Location on Inherited Form

A

Andrew Venmore

Hello,

I have a base dialog form with a panel docked to the bottom with an OK and a
Cancel button in it (all Modifiers=Protected, buttons' Anchor=Top,Right). At
design time the size of the base form is, for e.g., (200, 200), and the
location of the OK button is (50, 10). I then inherit from this form and
resize the descendant to (400, 400) - so the OK button's location is (250,
10).

If I save and re-open the descendant form in the VS2003 designer on one
machine, all the controls appear where they are expected to be, but if I
open the IDENTICAL descendant form on another machine, the OK button shifts
location to (450, 10)!

So it appears that on the one machine the button's location is set after the
form has been resized, and on the other the location is set, the form
resizes and the anchor property causes the button to move further to the
right during the resize.

Can anyone shed any light on this problem? I could understand if it was a
bug (http://support.microsoft.com/default.aspx?scid=kb;en-us;316560) and I'd
have to work in a particular way or implement a workaround, but how do you
approach this if it is not consistent?

TIA
Andrew Venmore
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top