inherited forms hide default member!

G

Giojo

Hello guys!
I have a problem with vistual studio 2005, it's a strange problem...
I have a form, I choose some properties to change so in *.designer.cs
there are the members I changed, only these..
Afterward I inherited my form to make another form, putting there some
default member, so
my B inherits my A form
but B has default members (default for visual studio) that A has
personalized, so in B.designer.cs aren't the members definitions
because visual studio puts only the member you are personalized!
At runtime B calls the constructor of A and takes the A properties!
So, do you know if there is an option in visual studio?! Is it a bug?!
The only way is to specify the default members in B after calling the a
constuctor?
Thank tou to all!
Giojo
 
O

ohadasor

I didn't understand what is the meaning of "personalized member" and
"default member".

Please explain.
 
G

Giojo

When you create a form, the properties window in Visual studio 2005
permit you to personalize some params, for example Dock.

If you leave the default value (none) in FormName.Designer.cs will be
nothing about dock, even if you personalize that property, for example
you choose fill, in
DormName.designer.cs will be the line:
this.Dock = System.Windows.Forms.DockStyle.Fill;

I want that my child class has the Dock property as "none"

But if I inherit the base class the line
this.Dock = System.Windows.Forms.DockStyle.Fill;
will be called and in the child constructor will be nothing because for
visual studio "None" is a default value..
Is it clear now?
Thank you!
Giojo
 

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