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 controls
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 place
addition controls on the "frmChild" form. When I rebuild the project, the
original base controls move to new locations (often off the bounds of the
form). If I remove the new controls to the child class and then rebuild,
violia, the original base control's snap back to the correct locations!!
What in the heck is going on here? It seems that I can't use inherited
forms for this reason... but I really want too.
- Peter
PS. Version 7.1.3088 8 6620
"Spam Trap" <sp**@midar.com> wrote in message
news:40***********************@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 controls 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 place addition controls on the "frmChild" form. When I rebuild the project, the original base controls move to new locations (often off the bounds of the form). If I remove the new controls to the child class and then rebuild, violia, the original base control's snap back to the correct locations!!
What in the heck is going on here? It seems that I can't use inherited forms for this reason... but I really want too.
- Peter PS. Version 7.1.3088
To answer my own question (a least a little bit)...
It looks like a serious error with the anchor property on the inherited
form... unless I'm missing something pretty obvious?
- Peter
"Spam Trap" <sp**@midar.com> wrote in message
news:40***********************@news.optusnet.com.a u... "Spam Trap" <sp**@midar.com> wrote in message news:40***********************@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 controls 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
place addition controls on the "frmChild" form. When I rebuild the project,
the original base controls move to new locations (often off the bounds of
the form). If I remove the new controls to the child class and then rebuild, violia, the original base control's snap back to the correct locations!!
What in the heck is going on here? It seems that I can't use inherited forms for this reason... but I really want too.
- Peter PS. Version 7.1.3088
To answer my own question (a least a little bit)...
It looks like a serious error with the anchor property on the inherited form... unless I'm missing something pretty obvious?
- Peter
Ok... another update. The problem appears when the base classes control's
have their modifier properties set to Friend (which should be ok... but
isn't for some reason). I change their modifer properties to Public and the
problem stopped.
It's not an ideal, and would still like to hear why this is so. The Help
file cautions Inheritors, but I don't fully understand if this applies in my
case.
- Peter
"Spam Trap" <sp**@midar.com> wrote in message
news:40**********************@news.optusnet.com.au ... "Spam Trap" <sp**@midar.com> wrote in message news:40***********************@news.optusnet.com.a u... "Spam Trap" <sp**@midar.com> wrote in message news:40***********************@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
controls 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 place addition controls on the "frmChild" form. When I rebuild the project, the original base controls move to new locations (often off the bounds of the form). If I remove the new controls to the child class and then
rebuild, violia, the original base control's snap back to the correct
locations!! What in the heck is going on here? It seems that I can't use
inherited forms for this reason... but I really want too.
- Peter PS. Version 7.1.3088
To answer my own question (a least a little bit)...
It looks like a serious error with the anchor property on the inherited form... unless I'm missing something pretty obvious?
- Peter
Ok... another update. The problem appears when the base classes control's have their modifier properties set to Friend (which should be ok... but isn't for some reason). I change their modifer properties to Public and
the problem stopped.
It's not an ideal, and would still like to hear why this is so. The Help file cautions Inheritors, but I don't fully understand if this applies in
my case.
- Peter
Ok... back to my original point. Does anyone know of a fix.
I've come to the conclusion that inherited forms with controls that are
archored are the BUGGIEST things on Earth!
BUG BUG BUG BUG BUG.... please... someone proove me wrong? Can anyone at
least find a KB article on this - I can't.
- Peter
Hello Peter
I created a Base class called frmBase and placed 2 text boxes
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 anchored
them top and right
I ran the project. Sizing worked just fine and nothing moved
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" <sp**@midar.com> wrote in message
news:40***********************@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 controls 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 place addition controls on the "frmChild" form. When I rebuild the project, the original base controls move to new locations (often off the bounds of the form). If I remove the new controls to the child class and then rebuild, violia, the original base control's snap back to the correct locations!!
What in the heck is going on here? It seems that I can't use inherited forms for this reason... but I really want too.
- Peter PS. Version 7.1.3088
thank you for taking the time to examine my problem. Yes, this is a strange
one. If you do things in a nice neat order, then there is no problem. The
problems start to occur when you move or remove controls on the inherited
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 class,
then placing a groupbox onto the child form that is anchored to all sides.
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" <Ib*****@malluf.com> wrote in message
news:uF**************@TK2MSFTNGP11.phx.gbl... Hello Peter I created a Base class called frmBase and placed 2 text boxes 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
anchored them top and right I ran the project. Sizing worked just fine and nothing moved 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" <sp**@midar.com> wrote in message news:40***********************@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 controls 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
place addition controls on the "frmChild" form. When I rebuild the project,
the original base controls move to new locations (often off the bounds of
the form). If I remove the new controls to the child class and then rebuild, violia, the original base control's snap back to the correct locations!!
What in the heck is going on here? It seems that I can't use inherited forms for this reason... but I really want too.
- Peter PS. Version 7.1.3088
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 resets
this line of code.
There seems to be a bug in this area... unless I'm missing something (and I
still think I am?)
- Peter
"Spam Trap" <sp**@midar.com> wrote in message
news:40***********************@news.optusnet.com.a u... thank you for taking the time to examine my problem. Yes, this is a
strange one. If you do things in a nice neat order, then there is no problem. The problems start to occur when you move or remove controls on the inherited 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 class, then placing a groupbox onto the child form that is anchored to all sides. 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" <Ib*****@malluf.com> wrote in message news:uF**************@TK2MSFTNGP11.phx.gbl... Hello Peter I created a Base class called frmBase and placed 2 text
boxes 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 anchored them top and right I ran the project. Sizing worked just fine and nothing
moved 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" <sp**@midar.com> wrote in message news:40***********************@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
controls 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 place addition controls on the "frmChild" form. When I rebuild the project, the original base controls move to new locations (often off the bounds of the form). If I remove the new controls to the child class and then
rebuild, violia, the original base control's snap back to the correct
locations!! What in the heck is going on here? It seems that I can't use
inherited forms for this reason... but I really want too.
- Peter PS. Version 7.1.3088
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" <sp**@midar.com> wrote in message
news:40***********************@news.optusnet.com.a u... 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
resets this line of code.
There seems to be a bug in this area... unless I'm missing something (and
I still think I am?)
- Peter
"Spam Trap" <sp**@midar.com> wrote in message news:40***********************@news.optusnet.com.a u...
thank you for taking the time to examine my problem. Yes, this is a strange one. If you do things in a nice neat order, then there is no problem.
The problems start to occur when you move or remove controls on the
inherited 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
class, then placing a groupbox onto the child form that is anchored to all
sides. 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" <Ib*****@malluf.com> wrote in message news:uF**************@TK2MSFTNGP11.phx.gbl... Hello Peter I created a Base class called frmBase and placed 2 text boxes 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 anchored them top and right I ran the project. Sizing worked just fine and nothing moved 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" <sp**@midar.com> wrote in message news:40***********************@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 controls > 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 place > addition controls on the "frmChild" form. When I rebuild the
project, the > original base controls move to new locations (often off the bounds
of the > form). If I remove the new controls to the child class and then rebuild, > violia, the original base control's snap back to the correct locations!! > > What in the heck is going on here? It seems that I can't use inherited > forms for this reason... but I really want too. > > - Peter > PS. Version 7.1.3088 > >
I'm having a similar problem
I'm not inheriting the forms, though. I've created a simple form and everything was fine until I copied and pasted it into the same project to start another similar form. Now the form doesn't save its dimensions properly. When I save and close visual studio and then reopen, the form changes it's size and the buttons move around. I've unselected all of the anchors from the buttons and it still does it. If I resize the form at design time, the buttons are moving up and down the form at about one half the distance that I am resizing the bottom of the form
This is weird and I really haven't been able to find any mention of the problem elsewhere. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Matt |
last post by:
I have created an MDI child form that I am using as a base form in a VB.Net
MDI application. The base MDI child form has a series of menu options on
it. I then use this form to create other MDI...
|
by: Nick Zdunic |
last post by:
Hi,
I have some forms in my application. Some visually inherited forms resize
themselves in Visual Studio - ruuning my previous settings. Locking the
form has no effect either.
The forms it...
|
by: Mauro |
last post by:
Hi,
I need a big help to resolve this problem.
I need to put a usercontrol in a datagrid: this control check if the code
inserted is present in a archive and if not return a error message.
(In...
|
by: Ty Salistean |
last post by:
I have a form that I inherited from System.Windows.Forms. I use that form
everywhere in my system. I went back to my base class form and changed the
size, expecting all of my children forms to...
|
by: |
last post by:
Let me explain step wise.
1.. I have a site running on port 5555
2.. If contains web.config file with contains <Forms> authentication.
3.. The site contains a sub-folder named "MembersArea"...
|
by: Peter Proost |
last post by:
Hi group I have the following piece of code that should resize the bitmap in
a picture box but it doesn't work as I tought it would. Can someone help me
with it?
thnx Peter
Public Class...
|
by: Geroge D. Lake |
last post by:
Hi,
I need to disable the resizing of a datagrid.
I have tried al day and no luck.
Any Ideas?
Thanks.
George.
|
by: gilgames |
last post by:
I am new in VB.Net, I need some help.
I want to resize my dialogs dynamically (so that a dialog made for
1280x1024 screens shows properly on 800x640 screen. I make the
calculation in the Handles...
|
by: Rob |
last post by:
I need to create a form that will resize only the verticle size of the Form
and not the width. So far I'm partial to the following code. Can someone
please elaborate the ??? . . . .
Const...
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |