Form1 Frm1= new Form1(); Form1 Frm2= Frm1.MemberwiseClone(); Frm2.Show();
Form1 Frm2= Clone() as Form1; public object Clone() { BinaryFormatter formatter = new BinaryFormatter(); MemoryStream stream = new MemoryStream(); formatter.Serialize(stream, this); stream.Seek(0, SeekOrigin.Begin); this.MemberwiseClone(); return (Form1)formatter.Deserialize(stream); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)