I'm trying to get my head around using serialization with forms. Here's the issue.
I've got a form which implements ISerializable. It contains custom controls that implement Iserializable as well. I can serialize those controls in the GetObjectData method on the form. The problem comes when I try to handle the Deserialization constructor on the form. I have to call InitializeComponent, where the designer generated code does it's thing (namely creating the controls, positioning them, etc). After calling that, I'd want to deserialize the custom controls; however, they've already been created and positioned (they only serialize a subset of their information, so I need the designer code to position them.), and I'd be creating them again. I don't want my form to know what information the custom controls are serializing, so I can't just serialize the settings for the controls. I also don't want to modify the InitializeComponent function, because I don't want to lose the ability to modify the form in the designer. Any suggestions? You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.