Fixing form size in design mode from base form

G

Guest

Hi
Does anybody know of a way to fix the size of inheriting forms by setting a
size in a base form. I would like to remove the ability of developers to
change the size of a form (in design mode) if they inherit from a particular
base form. I know you can override the SelectionRules property of a control
designer to fix a control size but it doesn't seem to work for inheriting
forms.
 
K

Keenan Newton

Well i suppose you could override the Size property accessors to ignore
any changes made from the inherited form. I think that should do the
trick. I did a similar method to prevent others from trying to change
the font of a control.
 
G

Guest

Thanks for your reply Keenan, I was thinking I would have to implement my own
designer, but what you said lead me to just setting the min and max form
sizes on the base which works.
 
G

Guest

You might want to look into the BrowsableAttribute and the
DesignerSerializationVisibilityAttribute in addition to setting the minimum
and maximum size.

Regards,
Matt Garven
 

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