<div dir="ltr"><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Monaco,Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(86,156,214)">function</span> <span style="color:rgb(220,220,170)">SaveComponent</span>(AComponent: TComponent): <span style="color:rgb(78,201,176)">string</span>;</div><div><span style="color:rgb(86,156,214)">var</span></div><div>  VInput: TBytesStream;</div><div>  VOutput: TStringStream;</div><div><span style="color:rgb(86,156,214)">begin</span></div><div>  VInput := TBytesStream.Create(<span style="color:rgb(181,206,168)">nil</span>);</div><div>  VOutput := TStringStream.Create(<span style="color:rgb(206,145,120)">''</span>);</div><div>  <span style="color:rgb(86,156,214)">try</span></div><div>    VInput.WriteComponent(AComponent);</div><div>    VInput.Seek(<span style="color:rgb(181,206,168)">0</span>, soBeginning);</div><div>    ObjectBinaryToText(VInput, VOutput); </div><div>    <span style="color:rgb(156,220,254)">Result</span> := VOutput.DataString;</div><div>  <span style="color:rgb(86,156,214)">finally</span></div><div>    VOutput.Free;</div><div>    VInput.Free;</div><div>  <span style="color:rgb(86,156,214)">end</span>;</div><div><span style="color:rgb(86,156,214)">end</span>;</div></div><div><br></div><div><br></div><div>Function is working except for events... they are not serialized....<br>I believe the problem is in<br></div><div><br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Monaco,Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre-wrap"><br><div><span style="color:rgb(86,156,214)">Class</span> <span style="color:rgb(86,156,214)">function</span> <span style="color:rgb(220,220,170)">TObject.MethodName</span>(aCode : <span style="color:rgb(78,201,176)">Pointer</span>) : <span style="color:rgb(78,201,176)">String</span>;</div></div></div><div class="gmail-yj6qo"></div><div class="gmail-adL"><br></div></div>