Hi Bill,
The solution to the problem is a little complex.
To prevent the user from moving or deleting controls on the form designer,
you can set the "Locked" property of the controls to true.
To make the properties of the controls/components are read-only, since
PropertyGrid is not part of the designer, you can use an object acting as a
property bag for the selected component and assign it to the SelectedObject
property of the PropertyGrid at the event when a component is selected in
the designer.
The property bag exposes all the properties of the selected component but
make them all read-only.
If you're using .NET 1.x, you create a class and implement the
ICustomTypeDescriptor interface in this class so as to add all the
PropertyDescriptor objects of the selected component to the custom class
and add ReadOnlyAttribute to each property.
If you're using .NET 2.0, you create a class and a separate class that
implements the ICustomTypeDescriptor interface and then register this class
as the provider of descriptions for the above custom type.
For more information on how to implement custom type descriptor, please
refer to the following blog article:
http://blogs.msdn.com/msdnts/archive/2007/01/19/how-to-bind-a-datagridview-c olumn-to-a-second-level-property-of-a-data-source.aspx
Hope this helps.
If you have any question, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support