Serializing the Forms
-
Can we Serialize an enter Form?
-
Can we Serialize an enter Form?
And what do you mean by an "enter Form". It's rather ambiquous, and serialization doesn't really care what kind of object you're serializing so long as its attributed directly with
SerializableAttribute
. That attribute is not inheritted. Since theForm
class is not attributed withSerializableAttribute
, then you need to attribute your derivative class. But ask yourself why you need to serialize it and what, specifically, you need to serialize. Much of the form is specific to that instance and should not be serialized (like theHandle
) if you plan on either re-creating it or saving it across multiple sessions (a session being separate logins, processes, etc.). To control how your form (or any object) is serialized, implementISerializable
. For more information on serialization, read Serializing Objects[^] in the .NET Framework SDK online. The SDK is also installed by default with VS.NET and can be installed stand-alone from http://msdn.microsoft.com/netframework[^]. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]