Fixing form size in design mode from base form

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
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.
 
You might want to look into the BrowsableAttribute and the
DesignerSerializationVisibilityAttribute in addition to setting the minimum
and maximum size.

Regards,
Matt Garven
 
Back
Top