I have a namespace
Company.UI.Forms where we have a form base class
BaseForm that inherits from
I need to limit the size of this form, so that if a concrete form, say
ExampleForm, derives from
BaseForm, it should have a fixed size in the VS designer view. The fixed size should be set or defined in some way (in the
BaseForm ctor?) so that the derived
ExampleForm and the designer picks it up.
Is that possible?
[Edit] The purpose is to use the base class as a template for a full screen form for a Windows CE device of known screen size, for which I want to be able to lay out child controls in the designer.
In standard WinForms you can override the SetBoundsCore method. This code will prevent the base classes to change it at design time... but remember it can be overriden by any inherited class anyway:
I've put the if because you specified to be at design time, if you don't want a resize at runtime as well remove it.