Hello,
It does work but probably I did not give enough details. :(
First make sure you target .Net4 not .Net4 client profile, go to project properties, Compile tab, Advanced Compile options, at the bottom select .Net 4 (not the default .Net4 client profile)
Second create your user control. (I called it UserControl1)
Third add a reference in you project to "System.Design.dll" (it is located in C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 )
Fourth add a new class in your project, and use this code:
Imports System.Windows.Forms.Design
Public Class UserControl1Designer
Inherits System.Windows.Forms.Design.ControlDesigner
Public Overrides ReadOnly Property SelectionRules() As System.Windows.Forms.Design.SelectionRules
Get
Return MyBase.SelectionRules And Not SelectionRules.AllSizeable
End Get
End Property
End Class
Fifth Open up the code of your user control (press F7 if you are in the designer)
make sure it looks like something like that:
Imports System.ComponentModel
<designer(gettype(usercontrol1designer))>
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
End Class
Done.
Now when you will drag your usercontrol on a form you will notice that it is not resizable.
Valery.