CodePudding user response:
Button to serialize? Don't understand,CodePudding user response:
[Serializable]Public class SerializableButton: Button, ISerializable
{
Public SerializableButton () {}
Public SerializableButton (SerializationInfo info, StreamingContext context)
{
Width=(int) info. GetDouble (" Width ");
Height=(int) info. GetDouble (" Height ");
}
Public void GetObjectData (SerializationInfo info, StreamingContext context)
{
Info. AddValue (" Width ", Width);
Info. AddValue (" Height ", Height);
}
}
CodePudding user response:
Don't button Winform controls such as seriation, because Winform controls using the Windows operating system resource, can't save,Although not serial control, but you can save controls the size of the position, color, etc.,
CodePudding user response:
https://bbs.csdn.net/topics/395259664