Inherited controls in worng location

G

Guest

Please can you explain the following...

I create a new form and add to it the following objects: a MainMenu, A
MenuItem, a PictureBox and a Button. I change the button properties so that
it is anchored BottomRight.

I then create another form which inherits from the first. And I add to it
another Button object. I then build my project. After the project has been
built the first Button object's location moves up by one pixel!

With some experimentation I've found this happens with other objects too but
equally, in some circumstanmces, if doesn't happen at all.

Can you explain why and whether there is a solution?
 
J

Jeffrey Tan[MSFT]

Hi Richard,

Thanks for post!!

I think this should be a known issue, which has been confirmed by
Microsoft, please refer to the 2 KB below to see if it resolves your
problem:
"FIX: Anchored Control on Inherited Form Changes Location When You
Recompile"
http://support.microsoft.com/?id=316560
"Layout Changes for Controls That Are in an Inherited User Control"
http://support.microsoft.com/default.aspx?scid=824451

If the problem still existed, please feel free to tell me. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
G

Guest

Thanks for your reply and yes I did see both these articles before posting
and yes my problem is similar to the problems described therein, but not
identical. In my problem the base and derived forms remain the same size and
the movement (of just one pixel) is visible in the designer. Note that making
the controls protected friend makes no difference.
 
J

Jeffrey Tan[MSFT]

Hi Richard,

Thanks for your feedback!!

Have you installed the SP1 for .Net Framework 1.1? There is also a known
issue in .Net Framwork 1.1 which is fixed in SP1, for more information,
please refer to:
"FIX: The layout of a control on an inherited Windows Form may change when
you use the .NET Framework 1.1"
http://support.microsoft.com/default.aspx?id=818776

Actually for this issue, I have followed your steps, but still did not
reproduce on my side, if you still can not address out this issue, I
suggest you attach a sample project in another reply, then we can download
your project, and reproduce the problem on my side. Thanks
============================================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
G

Guest

I'm using .Net Framework 1.1.4322 SP1.
I've sent my sample project to you by e-mail.
 
G

Guest

I'm using .Net Framework 1.1.4322 SP1.
I've sent my sample project to you by e-mail.
 
J

Jeffrey Tan[MSFT]

Hi Richard,

Thanks for your feedback!

But, it seems that I still did not get any email from you. Can you tell me
which email address you emailed to? Actually, you can touch me with the
title: (e-mail address removed), but remember to get rid of the word
"online.". Also, you may choose to attach it in the newsgroup.

I will wait for your further feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
J

Jeffrey Tan[MSFT]

Hi Richard,

Have you managed to send a sample project to me? Is your problem resolved?
Please feel free to tell me, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

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