Found this... although I can't promise it's accurate. Looks like the author
of the article needs to do more testing.
Microsoft Knowledge Base Article - 316560
FIX: Anchored Control on Inherited Form Changes Location When You Recompile
http://support.microsoft.com/default...b;en-us;316560
They claim this is a fix... but it isn't. I still have the problem in .NET
1.1.4322
This makes me mad! Crappy code. The "fix" (if you can call it a fix) is
NEVER to resize your forms. Not in design time - or run time! Crazy!
- Peter
PS. I have spent over 18 hours on this problem... and enough is enough.
VB.NET inherited forms that use anchored controls on the base class are
simply buggy. Microsoft has not given a commitment to fix the problem, and
their acknowledgement via KB article seems to suggest they have fixed it,
when really the have not. I have contact them via e-mail about this
problem... but I have no idea if this will fall on deaf ears.
"Spam Trap" <spam@midar.com> wrote in message
news:400a2163$0$14485$afc38c87@news.optusnet.com.a u...[color=blue]
> If I remark out the following line of code...
> Me.SuspendLayout()
>
> ...from the inherited form, then the next time the screen is
> refreshed/drawn, it is drawn properly without errors. However, VB.NET[/color]
resets[color=blue]
> this line of code.
>
> There seems to be a bug in this area... unless I'm missing something (and[/color]
I[color=blue]
> still think I am?)
>
> - Peter
>
> "Spam Trap" <spam@midar.com> wrote in message
> news:400a0411$0$26119$afc38c87@news.optusnet.com.a u...
>[color=green]
> > thank you for taking the time to examine my problem. Yes, this is a[/color]
> strange[color=green]
> > one. If you do things in a nice neat order, then there is no problem.[/color][/color]
The[color=blue][color=green]
> > problems start to occur when you move or remove controls on the[/color][/color]
inherited[color=blue][color=green]
> > form. And let's face it... you're always fiddling with form to get them
> > looking just right. Try archoring a button bottom-right on the base[/color][/color]
class,[color=blue][color=green]
> > then placing a groupbox onto the child form that is anchored to all[/color][/color]
sides.[color=blue][color=green]
> > Now... when you rebuild the project, the original buttons location has
> > changed for no reason.
> >
> > What is causing this bizzare behaviour??
> >
> > Thank you in advance.
> >
> > - Peter
> >
> >
> > "IbrahimMalluf" <Ibrahim@malluf.com> wrote in message
> > news:uFYR1BS3DHA.3216@TK2MSFTNGP11.phx.gbl...[color=darkred]
> > > Hello Peter
> > >
> > >
> > >
> > > I created a Base class called frmBase and placed 2 text[/color][/color]
> boxes[color=green][color=darkred]
> > > and one combo on it
> > >
> > > I anchored them left.top,right
> > >
> > >
> > >
> > > I created a child form called frmChild and inherited from
> > > frmBase. I them placed 2 textboxes and one datagrid on the form. I[/color]
> > anchored[color=darkred]
> > > them top and right
> > >
> > >
> > >
> > > I ran the project. Sizing worked just fine and nothing[/color][/color]
> moved[color=green][color=darkred]
> > > abnormally that I could tell.
> > >
> > >
> > >
> > > I am also running 7.1.3088 on Win2k
> > >
> > >
> > >
> > > Can you give a more precise example?
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Ibrahim Malluf
> > >
http://www.malluf.com
> > > ==============================================
> > > MCS Data Services Code Generator
> > >
http://64.78.34.175/mcsnet/DSCG/Announcement.aspx
> > > ==============================================
> > > Pocket PC Return On Investment Calculator
> > > Free Download
http://64.78.34.175/mcsnet/kwickKalk1.aspx
> > >
> > >
> > >
> > > "Spam Trap" <spam@midar.com> wrote in message
> > > news:400951c4$0$26115$afc38c87@news.optusnet.com.a u...
> > > > I am getting strange resizing problems when using an inherited form.
> > > >
> > > > Controls are moving themselves seemingly randomly, but reproducibly.
> > > >
> > > > "frmBase" is my base class (a windows form), and contains a few[/color][/color]
> controls[color=green][color=darkred]
> > > > anchored to the sides of the form.
> > > >
> > > > "frmChild" inherits from "frmBase"... and the controls appear on the
> > > > inherited form as expected. However things start going wrong when I[/color]
> > place[color=darkred]
> > > > addition controls on the "frmChild" form. When I rebuild the[/color][/color][/color]
project,[color=blue][color=green]
> > the[color=darkred]
> > > > original base controls move to new locations (often off the bounds[/color][/color][/color]
of[color=blue][color=green]
> > the[color=darkred]
> > > > form). If I remove the new controls to the child class and then[/color][/color]
> rebuild,[color=green][color=darkred]
> > > > violia, the original base control's snap back to the correct[/color][/color]
> locations!![color=green][color=darkred]
> > > >
> > > > What in the heck is going on here? It seems that I can't use[/color][/color]
> inherited[color=green][color=darkred]
> > > > forms for this reason... but I really want too.
> > > >
> > > > - Peter
> > > > PS. Version 7.1.3088
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]