Not sure what you're asking here.
Are you trying to create a control which cannot be resized or are you trying to prevent normally resizable controls from being resized within your own control?
A simplecontrol with no resize handles in the designer: (needs a reference to System.Design.dll)
[Designer(typeof(MyDesigner))]
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}
}
public class MyDesigner : ControlDesigner
{
public override SelectionRules SelectionRules
{
get
{
SelectionRules rules = base.SelectionRules;
rules &= ~SelectionRules.AllSizeable;
return rules;
}
}
}
note that there are several properties and methods which can change the size and you will need to find and code for all of them:
just a few of them are:Size, Width, Height, Bounds, SetBounds()
Mick Doherty
http://dotnetrix.co.uk