Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / September 2005

Tip: Looking for answers? Try searching our database.

Serializing Forms and Controls on a Custom Forms Designer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Whitchurch-Bennett - 15 Sep 2005 17:37 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.