Hi there,
I have successfully created a custom forms designer in VB.NET 2005, and this
works very well.
However, I cannot seem to see how to load and save the designer's layout,
ie. where the controls are on the form, and their properties. I have tried
several ways, and researched all afternoon.
Can anyone please tell me how to go about this the best way.
Many thanks,
David Whitchurch-Bennett
Jeffrey Tan[MSFT] - 20 Sep 2005 11:14 GMT
Hi David,
Thanks for your post.
For your statement of "I have successfully created a custom forms designer
in VB.NET 2005", do you mean that you have implemented all the design-time
services of VS.net designer, such as IDesignerHost, etc..? I assume so.
Normally, to load and store the components on the designer, we should
implement a class which inherited from
System.ComponentModel.Design.Serialization.DesignerLoader class. Also, we
should have a class implementing IDesignerSerializationManager interface.
Then we can just code DOM to serialize the components as code file.
Microsoft has released a KB for implementing a customized designer. In this
customized designer, it implemented the save and store function. Please
refer to it:
"HOW TO: Serialize Web Server Controls by Using Visual C# .NET"
http://support.microsoft.com/?id=328547
Note: the serialization code is in SampleDesignerLoader.cs file.
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.